Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 192560
Collapse All | Expand All

(-)linux-2.6.18-rc4-mm1/fs/reiserfs/super.c~reiserfs-fix-fill_super (-3 / +14 lines)
Lines 1384-1390 static __u32 find_hash_out(struct super_ Link Here
1384
	do {			// Some serious "goto"-hater was there ;)
1384
	do {			// Some serious "goto"-hater was there ;)
1385
		u32 teahash, r5hash, yurahash;
1385
		u32 teahash, r5hash, yurahash;
1386
1386
1387
		make_cpu_key(&key, inode, ~0, TYPE_DIRENTRY, 3);
1387
		make_cpu_key(&key, inode, LLONG_MAX, TYPE_DIRENTRY, 3);
1388
		retval = search_by_entry_key(s, &key, &path, &de);
1388
		retval = search_by_entry_key(s, &key, &path, &de);
1389
		if (retval == IO_ERROR) {
1389
		if (retval == IO_ERROR) {
1390
			pathrelse(&path);
1390
			pathrelse(&path);
Lines 1549-1555 static int reiserfs_fill_super(struct su Link Here
1549
	struct reiserfs_super_block *rs;
1549
	struct reiserfs_super_block *rs;
1550
	char *jdev_name;
1550
	char *jdev_name;
1551
	struct reiserfs_sb_info *sbi;
1551
	struct reiserfs_sb_info *sbi;
1552
	int errval = -EINVAL;
1552
	int errval;
1553
1553
1554
	sbi = kmalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL);
1554
	sbi = kmalloc(sizeof(struct reiserfs_sb_info), GFP_KERNEL);
1555
	if (!sbi) {
1555
	if (!sbi) {
Lines 1576-1587 static int reiserfs_fill_super(struct su Link Here
1576
	if (reiserfs_parse_options
1576
	if (reiserfs_parse_options
1577
	    (s, (char *)data, &(sbi->s_mount_opt), &blocks, &jdev_name,
1577
	    (s, (char *)data, &(sbi->s_mount_opt), &blocks, &jdev_name,
1578
	     &commit_max_age) == 0) {
1578
	     &commit_max_age) == 0) {
1579
		errval = -EINVAL;
1579
		goto error;
1580
		goto error;
1580
	}
1581
	}
1581
1582
1582
	if (blocks) {
1583
	if (blocks) {
1583
		SWARN(silent, s, "jmacd-7: reiserfs_fill_super: resize option "
1584
		SWARN(silent, s, "jmacd-7: reiserfs_fill_super: resize option "
1584
		      "for remount only");
1585
		      "for remount only");
1586
		errval = -EINVAL;
1585
		goto error;
1587
		goto error;
1586
	}
1588
	}
1587
1589
Lines 1593-1598 static int reiserfs_fill_super(struct su Link Here
1593
		SWARN(silent, s,
1595
		SWARN(silent, s,
1594
		      "sh-2021: reiserfs_fill_super: can not find reiserfs on %s",
1596
		      "sh-2021: reiserfs_fill_super: can not find reiserfs on %s",
1595
		      reiserfs_bdevname(s));
1597
		      reiserfs_bdevname(s));
1598
		errval = -EINVAL;
1596
		goto error;
1599
		goto error;
1597
	}
1600
	}
1598
1601
Lines 1610-1615 static int reiserfs_fill_super(struct su Link Here
1610
		      "You may need to run fsck or increase size of your LVM partition");
1613
		      "You may need to run fsck or increase size of your LVM partition");
1611
		SWARN(silent, s,
1614
		SWARN(silent, s,
1612
		      "Or may be you forgot to reboot after fdisk when it told you to");
1615
		      "Or may be you forgot to reboot after fdisk when it told you to");
1616
		errval = -EINVAL;
1613
		goto error;
1617
		goto error;
1614
	}
1618
	}
1615
1619
Lines 1649-1654 static int reiserfs_fill_super(struct su Link Here
1649
	if (journal_init(s, jdev_name, old_format, commit_max_age)) {
1653
	if (journal_init(s, jdev_name, old_format, commit_max_age)) {
1650
		SWARN(silent, s,
1654
		SWARN(silent, s,
1651
		      "sh-2022: reiserfs_fill_super: unable to initialize journal space");
1655
		      "sh-2022: reiserfs_fill_super: unable to initialize journal space");
1656
		errval = -ENODEV;
1652
		goto error;
1657
		goto error;
1653
	} else {
1658
	} else {
1654
		jinit_done = 1;	/* once this is set, journal_release must be called
1659
		jinit_done = 1;	/* once this is set, journal_release must be called
Lines 1658-1668 static int reiserfs_fill_super(struct su Link Here
1658
	if (reread_meta_blocks(s)) {
1663
	if (reread_meta_blocks(s)) {
1659
		SWARN(silent, s,
1664
		SWARN(silent, s,
1660
		      "jmacd-9: reiserfs_fill_super: unable to reread meta blocks after journal init");
1665
		      "jmacd-9: reiserfs_fill_super: unable to reread meta blocks after journal init");
1666
		errval = -ENODEV;
1661
		goto error;
1667
		goto error;
1662
	}
1668
	}
1663
1669
1664
	if (replay_only(s))
1670
	if (replay_only(s)) {
1671
		errval = -EINVAL;
1665
		goto error;
1672
		goto error;
1673
	}
1666
1674
1667
	if (bdev_read_only(s->s_bdev) && !(s->s_flags & MS_RDONLY)) {
1675
	if (bdev_read_only(s->s_bdev) && !(s->s_flags & MS_RDONLY)) {
1668
		SWARN(silent, s,
1676
		SWARN(silent, s,
Lines 1677-1682 static int reiserfs_fill_super(struct su Link Here
1677
	if (!root_inode) {
1685
	if (!root_inode) {
1678
		SWARN(silent, s,
1686
		SWARN(silent, s,
1679
		      "jmacd-10: reiserfs_fill_super: get root inode failed");
1687
		      "jmacd-10: reiserfs_fill_super: get root inode failed");
1688
		errval = -ENODEV;
1680
		goto error;
1689
		goto error;
1681
	}
1690
	}
1682
1691
Lines 1688-1693 static int reiserfs_fill_super(struct su Link Here
1688
	s->s_root = d_alloc_root(root_inode);
1697
	s->s_root = d_alloc_root(root_inode);
1689
	if (!s->s_root) {
1698
	if (!s->s_root) {
1690
		iput(root_inode);
1699
		iput(root_inode);
1700
		errval = -ENOMEM;
1691
		goto error;
1701
		goto error;
1692
	}
1702
	}
1693
	// define and initialize hash function
1703
	// define and initialize hash function
Lines 1695-1700 static int reiserfs_fill_super(struct su Link Here
1695
	if (sbi->s_hash_function == NULL) {
1705
	if (sbi->s_hash_function == NULL) {
1696
		dput(s->s_root);
1706
		dput(s->s_root);
1697
		s->s_root = NULL;
1707
		s->s_root = NULL;
1708
		errval = -ENODEV;
1698
		goto error;
1709
		goto error;
1699
	}
1710
	}
1700
1711

Return to bug 192560