diff options
Diffstat (limited to 'fs/btrfs/super.c')
| -rw-r--r-- | fs/btrfs/super.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 3536bdb2d7cb..2ff7cd2db25f 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
| @@ -436,9 +436,9 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
| 436 | if (btrfs_test_opt(root, SSD)) | 436 | if (btrfs_test_opt(root, SSD)) |
| 437 | seq_puts(seq, ",ssd"); | 437 | seq_puts(seq, ",ssd"); |
| 438 | if (btrfs_test_opt(root, NOTREELOG)) | 438 | if (btrfs_test_opt(root, NOTREELOG)) |
| 439 | seq_puts(seq, ",no-treelog"); | 439 | seq_puts(seq, ",notreelog"); |
| 440 | if (btrfs_test_opt(root, FLUSHONCOMMIT)) | 440 | if (btrfs_test_opt(root, FLUSHONCOMMIT)) |
| 441 | seq_puts(seq, ",flush-on-commit"); | 441 | seq_puts(seq, ",flushoncommit"); |
| 442 | if (!(root->fs_info->sb->s_flags & MS_POSIXACL)) | 442 | if (!(root->fs_info->sb->s_flags & MS_POSIXACL)) |
| 443 | seq_puts(seq, ",noacl"); | 443 | seq_puts(seq, ",noacl"); |
| 444 | return 0; | 444 | return 0; |
| @@ -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 | } |
