aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hfsplus/super.c')
-rw-r--r--fs/hfsplus/super.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 40bdab79dae8..9b292dcc39c8 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -199,6 +199,9 @@ static void hfsplus_put_super(struct super_block *sb)
199 dprint(DBG_SUPER, "hfsplus_put_super\n"); 199 dprint(DBG_SUPER, "hfsplus_put_super\n");
200 if (!sb->s_fs_info) 200 if (!sb->s_fs_info)
201 return; 201 return;
202
203 lock_kernel();
204
202 if (sb->s_dirt) 205 if (sb->s_dirt)
203 hfsplus_write_super(sb); 206 hfsplus_write_super(sb);
204 if (!(sb->s_flags & MS_RDONLY) && HFSPLUS_SB(sb).s_vhdr) { 207 if (!(sb->s_flags & MS_RDONLY) && HFSPLUS_SB(sb).s_vhdr) {
@@ -220,6 +223,8 @@ static void hfsplus_put_super(struct super_block *sb)
220 unload_nls(HFSPLUS_SB(sb).nls); 223 unload_nls(HFSPLUS_SB(sb).nls);
221 kfree(sb->s_fs_info); 224 kfree(sb->s_fs_info);
222 sb->s_fs_info = NULL; 225 sb->s_fs_info = NULL;
226
227 unlock_kernel();
223} 228}
224 229
225static int hfsplus_statfs(struct dentry *dentry, struct kstatfs *buf) 230static int hfsplus_statfs(struct dentry *dentry, struct kstatfs *buf)