summaryrefslogtreecommitdiff
path: root/fs/hpfs/file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-09-03 11:55:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-03 11:55:55 -0700
commit824b005c86f91fe02eb2743a4526361f11786f70 (patch)
tree5e1834ed89f115f0e9ae4bfa1ebd8469140159b8 /fs/hpfs/file.c
parentdd5cdb48edfd34401799056a9acf61078d773f90 (diff)
parentf49a26e7718dd30b49e3541e3e25aecf5e7294e2 (diff)
Merge branch 'hpfs' (patches from Mikulas)
Merge hpfs upddate from Mikulas Patocka. * emailed patches from Mikulas Patocka <mikulas@twibright.com>: hpfs: update ctime and mtime on directory modification hpfs: support hotfixes
Diffstat (limited to 'fs/hpfs/file.c')
-rw-r--r--fs/hpfs/file.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c
index 7ca28d604bf7..d3bcdd975700 100644
--- a/fs/hpfs/file.c
+++ b/fs/hpfs/file.c
@@ -83,6 +83,11 @@ static int hpfs_get_block(struct inode *inode, sector_t iblock, struct buffer_he
if (s) {
if (bh_result->b_size >> 9 < n_secs)
n_secs = bh_result->b_size >> 9;
+ n_secs = hpfs_search_hotfix_map_for_range(inode->i_sb, s, n_secs);
+ if (unlikely(!n_secs)) {
+ s = hpfs_search_hotfix_map(inode->i_sb, s);
+ n_secs = 1;
+ }
map_bh(bh_result, inode->i_sb, s);
bh_result->b_size = n_secs << 9;
goto ret_0;
@@ -101,7 +106,7 @@ static int hpfs_get_block(struct inode *inode, sector_t iblock, struct buffer_he
inode->i_blocks++;
hpfs_i(inode)->mmu_private += 512;
set_buffer_new(bh_result);
- map_bh(bh_result, inode->i_sb, s);
+ map_bh(bh_result, inode->i_sb, hpfs_search_hotfix_map(inode->i_sb, s));
ret_0:
r = 0;
ret_r:
@@ -181,7 +186,7 @@ static int hpfs_write_end(struct file *file, struct address_space *mapping,
static sector_t _hpfs_bmap(struct address_space *mapping, sector_t block)
{
- return generic_block_bmap(mapping,block,hpfs_get_block);
+ return generic_block_bmap(mapping, block, hpfs_get_block);
}
const struct address_space_operations hpfs_aops = {