diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-10 13:49:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-10 13:49:08 -0400 |
commit | 93b49d45eb97574057ee03dfdd590c209f5132f8 (patch) | |
tree | d01e5af58331ab6a8c758e445aeb943cf803dfa9 /fs/btrfs/super.c | |
parent | f9f51cc0ce544224a8332a4c1733624fcbc70a32 (diff) | |
parent | b0c4f3222c7406f0aee9d52b7d604a1d36108463 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (22 commits)
Fix the race between capifs remount and node creation
Fix races around the access to ->s_options
switch ufs directories to ufs_sync_file()
Switch open_exec() and sys_uselib() to do_open_filp()
Make open_exec() and sys_uselib() use may_open(), instead of duplicating its parts
Reduce path_lookup() abuses
Make checkpatch.pl shut up on fs/inode.c
NULL noise in fs/super.c:kill_bdev_super()
romfs: cleanup romfs_fs.h
ROMFS: romfs_dev_read() error ignored
fs: dcache fix LRU ordering
ocfs2: Use nd_set_link().
Fix deadlock in ipathfs ->get_sb()
Fix a leak in failure exit in 9p ->get_sb()
Convert obvious places to deactivate_locked_super()
New helper: deactivate_locked_super()
reiserfs: remove privroot hiding in lookup
reiserfs: dont associate security.* with xattr files
reiserfs: fixup xattr_root caching
Always lookup priv_root on reiserfs mount and keep it
...
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 3536bdb2d7cb..6dfae5b28f59 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -502,8 +502,7 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, | |||
502 | 502 | ||
503 | if (s->s_root) { | 503 | if (s->s_root) { |
504 | if ((flags ^ s->s_flags) & MS_RDONLY) { | 504 | if ((flags ^ s->s_flags) & MS_RDONLY) { |
505 | up_write(&s->s_umount); | 505 | deactivate_locked_super(s); |
506 | deactivate_super(s); | ||
507 | error = -EBUSY; | 506 | error = -EBUSY; |
508 | goto error_close_devices; | 507 | goto error_close_devices; |
509 | } | 508 | } |
@@ -517,8 +516,7 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, | |||
517 | error = btrfs_fill_super(s, fs_devices, data, | 516 | error = btrfs_fill_super(s, fs_devices, data, |
518 | flags & MS_SILENT ? 1 : 0); | 517 | flags & MS_SILENT ? 1 : 0); |
519 | if (error) { | 518 | if (error) { |
520 | up_write(&s->s_umount); | 519 | deactivate_locked_super(s); |
521 | deactivate_super(s); | ||
522 | goto error_free_subvol_name; | 520 | goto error_free_subvol_name; |
523 | } | 521 | } |
524 | 522 | ||
@@ -535,15 +533,13 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, | |||
535 | mutex_unlock(&s->s_root->d_inode->i_mutex); | 533 | mutex_unlock(&s->s_root->d_inode->i_mutex); |
536 | 534 | ||
537 | if (IS_ERR(root)) { | 535 | if (IS_ERR(root)) { |
538 | up_write(&s->s_umount); | 536 | deactivate_locked_super(s); |
539 | deactivate_super(s); | ||
540 | error = PTR_ERR(root); | 537 | error = PTR_ERR(root); |
541 | goto error_free_subvol_name; | 538 | goto error_free_subvol_name; |
542 | } | 539 | } |
543 | if (!root->d_inode) { | 540 | if (!root->d_inode) { |
544 | dput(root); | 541 | dput(root); |
545 | up_write(&s->s_umount); | 542 | deactivate_locked_super(s); |
546 | deactivate_super(s); | ||
547 | error = -ENXIO; | 543 | error = -ENXIO; |
548 | goto error_free_subvol_name; | 544 | goto error_free_subvol_name; |
549 | } | 545 | } |