aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hfsplus')
-rw-r--r--fs/hfsplus/super.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 9bda9fd35511..6a2349058618 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -215,16 +215,14 @@ static void hfsplus_put_super(struct super_block *sb)
215 if (!sb->s_fs_info) 215 if (!sb->s_fs_info)
216 return; 216 return;
217 217
218 if (sb->s_dirt)
219 hfsplus_write_super(sb);
220 if (!(sb->s_flags & MS_RDONLY) && sbi->s_vhdr) { 218 if (!(sb->s_flags & MS_RDONLY) && sbi->s_vhdr) {
221 struct hfsplus_vh *vhdr = sbi->s_vhdr; 219 struct hfsplus_vh *vhdr = sbi->s_vhdr;
222 220
223 vhdr->modify_date = hfsp_now2mt(); 221 vhdr->modify_date = hfsp_now2mt();
224 vhdr->attributes |= cpu_to_be32(HFSPLUS_VOL_UNMNT); 222 vhdr->attributes |= cpu_to_be32(HFSPLUS_VOL_UNMNT);
225 vhdr->attributes &= cpu_to_be32(~HFSPLUS_VOL_INCNSTNT); 223 vhdr->attributes &= cpu_to_be32(~HFSPLUS_VOL_INCNSTNT);
226 mark_buffer_dirty(sbi->s_vhbh); 224
227 sync_dirty_buffer(sbi->s_vhbh); 225 hfsplus_sync_fs(sb, 1);
228 } 226 }
229 227
230 hfs_btree_close(sbi->cat_tree); 228 hfs_btree_close(sbi->cat_tree);
@@ -447,8 +445,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
447 be32_add_cpu(&vhdr->write_count, 1); 445 be32_add_cpu(&vhdr->write_count, 1);
448 vhdr->attributes &= cpu_to_be32(~HFSPLUS_VOL_UNMNT); 446 vhdr->attributes &= cpu_to_be32(~HFSPLUS_VOL_UNMNT);
449 vhdr->attributes |= cpu_to_be32(HFSPLUS_VOL_INCNSTNT); 447 vhdr->attributes |= cpu_to_be32(HFSPLUS_VOL_INCNSTNT);
450 mark_buffer_dirty(sbi->s_vhbh); 448 hfsplus_sync_fs(sb, 1);
451 sync_dirty_buffer(sbi->s_vhbh);
452 449
453 if (!sbi->hidden_dir) { 450 if (!sbi->hidden_dir) {
454 mutex_lock(&sbi->vh_mutex); 451 mutex_lock(&sbi->vh_mutex);