aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fat/inode.c')
-rw-r--r--fs/fat/inode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 76f60c642c06..5bafaad00530 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)
673 if (inode->i_ino == MSDOS_FSINFO_INO) { 673 if (inode->i_ino == MSDOS_FSINFO_INO) {
674 struct super_block *sb = inode->i_sb; 674 struct super_block *sb = inode->i_sb;
675 675
676 lock_super(sb); 676 mutex_lock(&MSDOS_SB(sb)->s_lock);
677 err = fat_clusters_flush(sb); 677 err = fat_clusters_flush(sb);
678 unlock_super(sb); 678 mutex_unlock(&MSDOS_SB(sb)->s_lock);
679 } else 679 } else
680 err = __fat_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL); 680 err = __fat_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL);
681 681
@@ -1268,6 +1268,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
1268 b = (struct fat_boot_sector *) bh->b_data; 1268 b = (struct fat_boot_sector *) bh->b_data;
1269 } 1269 }
1270 1270
1271 mutex_init(&sbi->s_lock);
1271 sbi->cluster_size = sb->s_blocksize * sbi->sec_per_clus; 1272 sbi->cluster_size = sb->s_blocksize * sbi->sec_per_clus;
1272 sbi->cluster_bits = ffs(sbi->cluster_size) - 1; 1273 sbi->cluster_bits = ffs(sbi->cluster_size) - 1;
1273 sbi->fats = b->fats; 1274 sbi->fats = b->fats;