ext3: ext3_mark_recovery_complete() doesn't need to use lock_super
authorEric Sandeen <sandeen@redhat.com>
Mon, 14 Dec 2009 18:59:59 +0000 (12:59 -0600)
committerJan Kara <jack@suse.cz>
Wed, 23 Dec 2009 12:44:11 +0000 (13:44 +0100)
commit4854a5f0cbb1967fc7db3ea861d97afeea78b88b
tree092ac94277b2f3fc506f177a04f3e541e14b8aaa
parented505ee454dbf133b1a4067d3ac0325d4261eda1
ext3: ext3_mark_recovery_complete() doesn't need to use lock_super

The function ext3_mark_recovery_complete() is called from two call
paths: either (a) while mounting the filesystem, in which case there's
no danger of any other CPU calling write_super() until the mount is
completed, and (b) while remounting the filesystem read-write, in
which case the fs core has already locked the superblock.  This also
allows us to take out a very vile unlock_super()/lock_super() pair in
ext3_remount().

Port of ext4 commit a63c9eb2ce6f5028da90f282798232c4f398ceb8 by
Theodore Ts'o <tytso@mit.edu>.

CC: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext3/super.c