diff options
author | Christoph Hellwig <hch@lst.de> | 2010-10-01 05:41:50 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2010-10-01 05:41:50 +0200 |
commit | a9fdbf8c6070d49c482e209df7ee93d9ec41ea27 (patch) | |
tree | d8e2547819bc1e75f3ac29804e6c5b8b23f65c75 /fs/hfsplus/super.c | |
parent | 40bf48afe92fcea61e7e164f0b2599fba8b88124 (diff) |
hfsplus: use alloc_mutex in hfsplus_sync_fs
Use alloc_mutex to protect hfsplus_sync_fs against itself and concurrent
allocations, which allows to get rid of lock_super in hfsplus.
Note that most fields in the superblock still aren't protected against
concurrent allocations, that will follow later.
Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus/super.c')
-rw-r--r-- | fs/hfsplus/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 3dc62aa58728..4936642debaa 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -162,7 +162,7 @@ int hfsplus_sync_fs(struct super_block *sb, int wait) dprint(DBG_SUPER, "hfsplus_write_super\n"); - lock_super(sb); + mutex_lock(&HFSPLUS_SB(sb).alloc_mutex); sb->s_dirt = 0; vhdr->free_blocks = cpu_to_be32(HFSPLUS_SB(sb).free_blocks); @@ -195,7 +195,7 @@ int hfsplus_sync_fs(struct super_block *sb, int wait) } HFSPLUS_SB(sb).flags &= ~HFSPLUS_SB_WRITEBACKUP; } - unlock_super(sb); + mutex_unlock(&HFSPLUS_SB(sb).alloc_mutex); return 0; } |