summaryrefslogtreecommitdiffstats
path: root/fs/fat/namei_msdos.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fat/namei_msdos.c')
-rw-r--r--fs/fat/namei_msdos.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c
index bbc94ae4fd7..bbca5c186ae 100644
--- a/fs/fat/namei_msdos.c
+++ b/fs/fat/namei_msdos.c
@@ -662,12 +662,16 @@ static int msdos_fill_super(struct super_block *sb, void *data, int silent)
{
int res;
+ lock_super(sb);
res = fat_fill_super(sb, data, silent, &msdos_dir_inode_operations, 0);
- if (res)
+ if (res) {
+ unlock_super(sb);
return res;
+ }
sb->s_flags |= MS_NOATIME;
sb->s_root->d_op = &msdos_dentry_operations;
+ unlock_super(sb);
return 0;
}