diff options
-rw-r--r-- | fs/hfs/extent.c | 3 | ||||
-rw-r--r-- | fs/hfsplus/extents.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/fs/hfs/extent.c b/fs/hfs/extent.c index cbc8510ad222..5ea6b3d45eaa 100644 --- a/fs/hfs/extent.c +++ b/fs/hfs/extent.c | |||
@@ -482,7 +482,8 @@ void hfs_file_truncate(struct inode *inode) | |||
482 | page_cache_release(page); | 482 | page_cache_release(page); |
483 | mark_inode_dirty(inode); | 483 | mark_inode_dirty(inode); |
484 | return; | 484 | return; |
485 | } | 485 | } else if (inode->i_size == HFS_I(inode)->phys_size) |
486 | return; | ||
486 | size = inode->i_size + HFS_SB(sb)->alloc_blksz - 1; | 487 | size = inode->i_size + HFS_SB(sb)->alloc_blksz - 1; |
487 | blk_cnt = size / HFS_SB(sb)->alloc_blksz; | 488 | blk_cnt = size / HFS_SB(sb)->alloc_blksz; |
488 | alloc_cnt = HFS_I(inode)->alloc_blocks; | 489 | alloc_cnt = HFS_I(inode)->alloc_blocks; |
diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c index 376498cc64fd..e7235ca79a95 100644 --- a/fs/hfsplus/extents.c +++ b/fs/hfsplus/extents.c | |||
@@ -461,7 +461,9 @@ void hfsplus_file_truncate(struct inode *inode) | |||
461 | page_cache_release(page); | 461 | page_cache_release(page); |
462 | mark_inode_dirty(inode); | 462 | mark_inode_dirty(inode); |
463 | return; | 463 | return; |
464 | } | 464 | } else if (inode->i_size == HFSPLUS_I(inode).phys_size) |
465 | return; | ||
466 | |||
465 | blk_cnt = (inode->i_size + HFSPLUS_SB(sb).alloc_blksz - 1) >> HFSPLUS_SB(sb).alloc_blksz_shift; | 467 | blk_cnt = (inode->i_size + HFSPLUS_SB(sb).alloc_blksz - 1) >> HFSPLUS_SB(sb).alloc_blksz_shift; |
466 | alloc_cnt = HFSPLUS_I(inode).alloc_blocks; | 468 | alloc_cnt = HFSPLUS_I(inode).alloc_blocks; |
467 | if (blk_cnt == alloc_cnt) | 469 | if (blk_cnt == alloc_cnt) |