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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 5f8044664a3c..d55ad67b8e42 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -208,7 +208,9 @@ static void hfsplus_write_super(struct super_block *sb)
208static void hfsplus_put_super(struct super_block *sb) 208static void hfsplus_put_super(struct super_block *sb)
209{ 209{
210 dprint(DBG_SUPER, "hfsplus_put_super\n"); 210 dprint(DBG_SUPER, "hfsplus_put_super\n");
211 if (!(sb->s_flags & MS_RDONLY)) { 211 if (!sb->s_fs_info)
212 return;
213 if (!(sb->s_flags & MS_RDONLY) && HFSPLUS_SB(sb).s_vhdr) {
212 struct hfsplus_vh *vhdr = HFSPLUS_SB(sb).s_vhdr; 214 struct hfsplus_vh *vhdr = HFSPLUS_SB(sb).s_vhdr;
213 215
214 vhdr->modify_date = hfsp_now2mt(); 216 vhdr->modify_date = hfsp_now2mt();
@@ -226,6 +228,8 @@ static void hfsplus_put_super(struct super_block *sb)
226 brelse(HFSPLUS_SB(sb).s_vhbh); 228 brelse(HFSPLUS_SB(sb).s_vhbh);
227 if (HFSPLUS_SB(sb).nls) 229 if (HFSPLUS_SB(sb).nls)
228 unload_nls(HFSPLUS_SB(sb).nls); 230 unload_nls(HFSPLUS_SB(sb).nls);
231 kfree(sb->s_fs_info);
232 sb->s_fs_info = NULL;
229} 233}
230 234
231static int hfsplus_statfs(struct super_block *sb, struct kstatfs *buf) 235static int hfsplus_statfs(struct super_block *sb, struct kstatfs *buf)