summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-03-23 11:11:05 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-21 18:31:17 -0400
commitd3f2147307cce9eac56dd91d381709aa3f1615b3 (patch)
treec1512bc87bdd657d379c6cf67f9c84436ad8fb52 /fs
parent7ed1ee6118ae77330cae2a6d5e9383532f7dfb48 (diff)
downloadblackbird-obmc-linux-d3f2147307cce9eac56dd91d381709aa3f1615b3.tar.gz
blackbird-obmc-linux-d3f2147307cce9eac56dd91d381709aa3f1615b3.zip
Move grabbing s_umount to callers of grab_super()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/block_dev.c1
-rw-r--r--fs/super.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 6dcee88c2e5d..39cb6591d37d 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -245,6 +245,7 @@ struct super_block *freeze_bdev(struct block_device *bdev)
sb = get_active_super(bdev);
if (!sb)
goto out;
+ down_write(&sb->s_umount);
if (sb->s_flags & MS_RDONLY) {
sb->s_frozen = SB_FREEZE_TRANS;
up_write(&sb->s_umount);
diff --git a/fs/super.c b/fs/super.c
index dba74e718751..61fa181faa43 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -210,7 +210,6 @@ static int grab_super(struct super_block *s) __releases(sb_lock)
{
if (atomic_inc_not_zero(&s->s_active)) {
spin_unlock(&sb_lock);
- down_write(&s->s_umount);
return 1;
}
/* it's going away */
@@ -317,6 +316,7 @@ retry:
up_write(&s->s_umount);
destroy_super(s);
}
+ down_write(&old->s_umount);
return old;
}
}
@@ -466,7 +466,7 @@ EXPORT_SYMBOL(get_super);
*
* Scans the superblock list and finds the superblock of the file system
* mounted on the device given. Returns the superblock with an active
- * reference and s_umount held exclusively or %NULL if none was found.
+ * reference or %NULL if none was found.
*/
struct super_block *get_active_super(struct block_device *bdev)
{
OpenPOWER on IntegriCloud