diff options
Diffstat (limited to 'fs/hfs')
-rw-r--r-- | fs/hfs/super.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 9f5eaa01cc77..3aac41751030 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c | |||
@@ -49,11 +49,13 @@ MODULE_LICENSE("GPL"); | |||
49 | */ | 49 | */ |
50 | static void hfs_write_super(struct super_block *sb) | 50 | static void hfs_write_super(struct super_block *sb) |
51 | { | 51 | { |
52 | lock_super(sb); | ||
52 | sb->s_dirt = 0; | 53 | sb->s_dirt = 0; |
53 | if (sb->s_flags & MS_RDONLY) | 54 | |
54 | return; | ||
55 | /* sync everything to the buffers */ | 55 | /* sync everything to the buffers */ |
56 | hfs_mdb_commit(sb); | 56 | if (!(sb->s_flags & MS_RDONLY)) |
57 | hfs_mdb_commit(sb); | ||
58 | unlock_super(sb); | ||
57 | } | 59 | } |
58 | 60 | ||
59 | /* | 61 | /* |