Skip to contentSkip to conversation

Another reiserfs_resize fix (unlock_super called incorrectly)

PATCH New Jeff Mahoney 1 participant 1 message Apr 19, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Another reiserfs_resize fix (unlock_super called incorrectly)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here's another fix for reiserfs_resize().

If reiserfs_allocate_list_bitmaps() fails, it calls unlock_super on the sb. This is incorrect, as it didn't lock it initially. do_remount_sb calls lock_super and unlock_super surrounding the ->remount_fs call, regardless of error.

The attach patch removes the unlock_super call.

- -Jeff

- --
Jeff Mahoney
SuSE Labs
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAhB8GLPWxlyuTD7IRAq/hAJ9AKMIo26EnvGyjHmaEBh1TaPsnsACfVYvf PY4TWrNLusOt6WWPjCWjPrs=
=Uc5g
-----END PGP SIGNATURE-----

fs/reiserfs/resize.c +0 -1
diff -rup linux-2.6.5.kgdb/fs/reiserfs/resize.c linux-2.6.5.kgdb.afs/fs/reiserfs/resize.c
@@ -82,7 +82,6 @@
 	    /* reallocate journal bitmaps */
 	    if (reiserfs_allocate_list_bitmaps(s, jbitmap, bmap_nr_new) < 0) {
 		printk("reiserfs_resize: unable to allocate memory for journal bitmaps\n");
-		unlock_super(s) ;
 		return -ENOMEM ;
 	    }
 	    /* the new journal bitmaps are zero filled, now we copy in the bitmap