diff options
-rw-r--r-- | drivers/mtd/mtdsuper.c | 3 | ||||
-rw-r--r-- | fs/9p/vfs_super.c | 5 | ||||
-rw-r--r-- | fs/afs/super.c | 3 | ||||
-rw-r--r-- | fs/btrfs/super.c | 12 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 3 | ||||
-rw-r--r-- | fs/devpts/inode.c | 5 | ||||
-rw-r--r-- | fs/ecryptfs/main.c | 5 | ||||
-rw-r--r-- | fs/libfs.c | 3 | ||||
-rw-r--r-- | fs/nfs/super.c | 15 | ||||
-rw-r--r-- | fs/proc/root.c | 3 | ||||
-rw-r--r-- | fs/ubifs/super.c | 3 | ||||
-rw-r--r-- | kernel/cgroup.c | 3 |
12 files changed, 21 insertions, 42 deletions
diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c index 92285d0089c2..af8b42e0a55b 100644 --- a/drivers/mtd/mtdsuper.c +++ b/drivers/mtd/mtdsuper.c | |||
@@ -74,8 +74,7 @@ static int get_sb_mtd_aux(struct file_system_type *fs_type, int flags, | |||
74 | 74 | ||
75 | ret = fill_super(sb, data, flags & MS_SILENT ? 1 : 0); | 75 | ret = fill_super(sb, data, flags & MS_SILENT ? 1 : 0); |
76 | if (ret < 0) { | 76 | if (ret < 0) { |
77 | up_write(&sb->s_umount); | 77 | deactivate_locked_super(sb); |
78 | deactivate_super(sb); | ||
79 | return ret; | 78 | return ret; |
80 | } | 79 | } |
81 | 80 | ||
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 7d23214e5599..0d29a57c63e6 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c | |||
@@ -174,10 +174,7 @@ P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n"); | |||
174 | return 0; | 174 | return 0; |
175 | 175 | ||
176 | release_sb: | 176 | release_sb: |
177 | if (sb) { | 177 | deactivate_locked_super(sb); |
178 | up_write(&sb->s_umount); | ||
179 | deactivate_super(sb); | ||
180 | } | ||
181 | 178 | ||
182 | free_stat: | 179 | free_stat: |
183 | kfree(st); | 180 | kfree(st); |
diff --git a/fs/afs/super.c b/fs/afs/super.c index aee239a048cb..2753f16dd315 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
@@ -405,8 +405,7 @@ static int afs_get_sb(struct file_system_type *fs_type, | |||
405 | sb->s_flags = flags; | 405 | sb->s_flags = flags; |
406 | ret = afs_fill_super(sb, ¶ms); | 406 | ret = afs_fill_super(sb, ¶ms); |
407 | if (ret < 0) { | 407 | if (ret < 0) { |
408 | up_write(&sb->s_umount); | 408 | deactivate_locked_super(sb); |
409 | deactivate_super(sb); | ||
410 | goto error; | 409 | goto error; |
411 | } | 410 | } |
412 | sb->s_options = new_opts; | 411 | sb->s_options = new_opts; |
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 | } |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 355e0efec0cf..5e6d35804d73 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -602,8 +602,7 @@ cifs_get_sb(struct file_system_type *fs_type, | |||
602 | 602 | ||
603 | rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0); | 603 | rc = cifs_read_super(sb, data, dev_name, flags & MS_SILENT ? 1 : 0); |
604 | if (rc) { | 604 | if (rc) { |
605 | up_write(&sb->s_umount); | 605 | deactivate_locked_super(sb); |
606 | deactivate_super(sb); | ||
607 | return rc; | 606 | return rc; |
608 | } | 607 | } |
609 | sb->s_flags |= MS_ACTIVE; | 608 | sb->s_flags |= MS_ACTIVE; |
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 63a4a59e4148..21165cf934ff 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c | |||
@@ -389,11 +389,10 @@ static int devpts_get_sb(struct file_system_type *fs_type, | |||
389 | return 0; | 389 | return 0; |
390 | 390 | ||
391 | out_dput: | 391 | out_dput: |
392 | dput(s->s_root); | 392 | dput(s->s_root); /* undo dget() in simple_set_mnt() */ |
393 | 393 | ||
394 | out_undo_sget: | 394 | out_undo_sget: |
395 | up_write(&s->s_umount); | 395 | deactivate_locked_super(s); |
396 | deactivate_super(s); | ||
397 | return error; | 396 | return error; |
398 | } | 397 | } |
399 | 398 | ||
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index ccabd5faa04d..9f0aa9883c28 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -614,9 +614,8 @@ static int ecryptfs_get_sb(struct file_system_type *fs_type, int flags, | |||
614 | } | 614 | } |
615 | goto out; | 615 | goto out; |
616 | out_abort: | 616 | out_abort: |
617 | dput(sb->s_root); | 617 | dput(sb->s_root); /* aka mnt->mnt_root, as set by get_sb_nodev() */ |
618 | up_write(&sb->s_umount); | 618 | deactivate_locked_super(sb); |
619 | deactivate_super(sb); | ||
620 | out: | 619 | out: |
621 | return rc; | 620 | return rc; |
622 | } | 621 | } |
diff --git a/fs/libfs.c b/fs/libfs.c index cd223190c4e9..80046ddf5063 100644 --- a/fs/libfs.c +++ b/fs/libfs.c | |||
@@ -246,8 +246,7 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name, | |||
246 | return 0; | 246 | return 0; |
247 | 247 | ||
248 | Enomem: | 248 | Enomem: |
249 | up_write(&s->s_umount); | 249 | deactivate_locked_super(s); |
250 | deactivate_super(s); | ||
251 | return -ENOMEM; | 250 | return -ENOMEM; |
252 | } | 251 | } |
253 | 252 | ||
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 1679a164c8c9..d2d67781c579 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -2111,8 +2111,7 @@ out_err_nosb: | |||
2111 | error_splat_root: | 2111 | error_splat_root: |
2112 | dput(mntroot); | 2112 | dput(mntroot); |
2113 | error_splat_super: | 2113 | error_splat_super: |
2114 | up_write(&s->s_umount); | 2114 | deactivate_locked_super(s); |
2115 | deactivate_super(s); | ||
2116 | goto out; | 2115 | goto out; |
2117 | } | 2116 | } |
2118 | 2117 | ||
@@ -2208,8 +2207,7 @@ out_err_noserver: | |||
2208 | return error; | 2207 | return error; |
2209 | 2208 | ||
2210 | error_splat_super: | 2209 | error_splat_super: |
2211 | up_write(&s->s_umount); | 2210 | deactivate_locked_super(s); |
2212 | deactivate_super(s); | ||
2213 | dprintk("<-- nfs_xdev_get_sb() = %d [splat]\n", error); | 2211 | dprintk("<-- nfs_xdev_get_sb() = %d [splat]\n", error); |
2214 | return error; | 2212 | return error; |
2215 | } | 2213 | } |
@@ -2469,8 +2467,7 @@ out_free: | |||
2469 | error_splat_root: | 2467 | error_splat_root: |
2470 | dput(mntroot); | 2468 | dput(mntroot); |
2471 | error_splat_super: | 2469 | error_splat_super: |
2472 | up_write(&s->s_umount); | 2470 | deactivate_locked_super(s); |
2473 | deactivate_super(s); | ||
2474 | goto out; | 2471 | goto out; |
2475 | } | 2472 | } |
2476 | 2473 | ||
@@ -2564,8 +2561,7 @@ out_err_noserver: | |||
2564 | return error; | 2561 | return error; |
2565 | 2562 | ||
2566 | error_splat_super: | 2563 | error_splat_super: |
2567 | up_write(&s->s_umount); | 2564 | deactivate_locked_super(s); |
2568 | deactivate_super(s); | ||
2569 | dprintk("<-- nfs4_xdev_get_sb() = %d [splat]\n", error); | 2565 | dprintk("<-- nfs4_xdev_get_sb() = %d [splat]\n", error); |
2570 | return error; | 2566 | return error; |
2571 | } | 2567 | } |
@@ -2649,8 +2645,7 @@ out_err_noserver: | |||
2649 | return error; | 2645 | return error; |
2650 | 2646 | ||
2651 | error_splat_super: | 2647 | error_splat_super: |
2652 | up_write(&s->s_umount); | 2648 | deactivate_locked_super(s); |
2653 | deactivate_super(s); | ||
2654 | dprintk("<-- nfs4_referral_get_sb() = %d [splat]\n", error); | 2649 | dprintk("<-- nfs4_referral_get_sb() = %d [splat]\n", error); |
2655 | return error; | 2650 | return error; |
2656 | } | 2651 | } |
diff --git a/fs/proc/root.c b/fs/proc/root.c index 1e15a2b176e8..b080b791d9e3 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c | |||
@@ -67,8 +67,7 @@ static int proc_get_sb(struct file_system_type *fs_type, | |||
67 | sb->s_flags = flags; | 67 | sb->s_flags = flags; |
68 | err = proc_fill_super(sb); | 68 | err = proc_fill_super(sb); |
69 | if (err) { | 69 | if (err) { |
70 | up_write(&sb->s_umount); | 70 | deactivate_locked_super(sb); |
71 | deactivate_super(sb); | ||
72 | return err; | 71 | return err; |
73 | } | 72 | } |
74 | 73 | ||
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index faa44f90608a..e9f7a754c4f7 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -2055,8 +2055,7 @@ static int ubifs_get_sb(struct file_system_type *fs_type, int flags, | |||
2055 | return 0; | 2055 | return 0; |
2056 | 2056 | ||
2057 | out_deact: | 2057 | out_deact: |
2058 | up_write(&sb->s_umount); | 2058 | deactivate_locked_super(sb); |
2059 | deactivate_super(sb); | ||
2060 | out_close: | 2059 | out_close: |
2061 | ubi_close_volume(ubi); | 2060 | ubi_close_volume(ubi); |
2062 | return err; | 2061 | return err; |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 382109b5baeb..a7267bfd3765 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -1133,8 +1133,7 @@ static int cgroup_get_sb(struct file_system_type *fs_type, | |||
1133 | free_cg_links: | 1133 | free_cg_links: |
1134 | free_cg_links(&tmp_cg_links); | 1134 | free_cg_links(&tmp_cg_links); |
1135 | drop_new_super: | 1135 | drop_new_super: |
1136 | up_write(&sb->s_umount); | 1136 | deactivate_locked_super(sb); |
1137 | deactivate_super(sb); | ||
1138 | return ret; | 1137 | return ret; |
1139 | } | 1138 | } |
1140 | 1139 | ||