diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fat/inode.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 0da04e6d1e34..be88208b83a6 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -199,7 +199,14 @@ static ssize_t fat_direct_IO(int rw, struct kiocb *iocb, | |||
199 | 199 | ||
200 | static sector_t _fat_bmap(struct address_space *mapping, sector_t block) | 200 | static sector_t _fat_bmap(struct address_space *mapping, sector_t block) |
201 | { | 201 | { |
202 | return generic_block_bmap(mapping, block, fat_get_block); | 202 | sector_t blocknr; |
203 | |||
204 | /* fat_get_cluster() assumes the requested blocknr isn't truncated. */ | ||
205 | mutex_lock(&mapping->host->i_mutex); | ||
206 | blocknr = generic_block_bmap(mapping, block, fat_get_block); | ||
207 | mutex_unlock(&mapping->host->i_mutex); | ||
208 | |||
209 | return blocknr; | ||
203 | } | 210 | } |
204 | 211 | ||
205 | static const struct address_space_operations fat_aops = { | 212 | static const struct address_space_operations fat_aops = { |