diff options
author | Marco Stornelli <marco.stornelli@gmail.com> | 2012-10-06 12:40:03 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-09 23:33:38 -0400 |
commit | e40b34c7921534a46f7bae23ec6646d3d9c2c7b2 (patch) | |
tree | 84a7ffac7bce215827fbde733aad964a5e38eaa4 /fs/fat/inode.c | |
parent | 67e2c19a3bcd32172c1d67294a1d6bb4bc60ca77 (diff) |
fat: drop lock/unlock super
Removed lock/unlock super. Added a new private s_lock mutex.
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fat/inode.c')
-rw-r--r-- | fs/fat/inode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 76f60c642c0..5bafaad0053 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -673,9 +673,9 @@ static int fat_write_inode(struct inode *inode, struct writeback_control *wbc) if (inode->i_ino == MSDOS_FSINFO_INO) { struct super_block *sb = inode->i_sb; - lock_super(sb); + mutex_lock(&MSDOS_SB(sb)->s_lock); err = fat_clusters_flush(sb); - unlock_super(sb); + mutex_unlock(&MSDOS_SB(sb)->s_lock); } else err = __fat_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL); @@ -1268,6 +1268,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, b = (struct fat_boot_sector *) bh->b_data; } + mutex_init(&sbi->s_lock); sbi->cluster_size = sb->s_blocksize * sbi->sec_per_clus; sbi->cluster_bits = ffs(sbi->cluster_size) - 1; sbi->fats = b->fats; |