diff options
Diffstat (limited to 'fs/super.c')
| -rw-r--r-- | fs/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/super.c b/fs/super.c index 3479ca6f005f..bd9eea4bb2bb 100644 --- a/fs/super.c +++ b/fs/super.c | |||
| @@ -305,8 +305,13 @@ retry: | |||
| 305 | if (s) { | 305 | if (s) { |
| 306 | up_write(&s->s_umount); | 306 | up_write(&s->s_umount); |
| 307 | destroy_super(s); | 307 | destroy_super(s); |
| 308 | s = NULL; | ||
| 308 | } | 309 | } |
| 309 | down_write(&old->s_umount); | 310 | down_write(&old->s_umount); |
| 311 | if (unlikely(!(old->s_flags & MS_BORN))) { | ||
| 312 | deactivate_locked_super(old); | ||
| 313 | goto retry; | ||
| 314 | } | ||
| 310 | return old; | 315 | return old; |
| 311 | } | 316 | } |
| 312 | } | 317 | } |
| @@ -918,6 +923,7 @@ vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void | |||
| 918 | goto out_free_secdata; | 923 | goto out_free_secdata; |
| 919 | BUG_ON(!mnt->mnt_sb); | 924 | BUG_ON(!mnt->mnt_sb); |
| 920 | WARN_ON(!mnt->mnt_sb->s_bdi); | 925 | WARN_ON(!mnt->mnt_sb->s_bdi); |
| 926 | mnt->mnt_sb->s_flags |= MS_BORN; | ||
| 921 | 927 | ||
| 922 | error = security_sb_kern_mount(mnt->mnt_sb, flags, secdata); | 928 | error = security_sb_kern_mount(mnt->mnt_sb, flags, secdata); |
| 923 | if (error) | 929 | if (error) |
