ext4: Use truncate_pagecache() in collapse range
A message that is not in the archive (sent off-list or not yet received): 002101cf5ac76d97bf048c73d0samsung.com
PATCH 1/1 ext4: Use truncate_pagecache() in collapse range
We should be using truncate_pagecache() instead of truncate_pagecache_range() in the collapse range because we're truncating page cache from offset to the end of file. truncate_pagecache() also get rid of the private COWed pages from the range because we're going to shift the end of the file.
--- fs/ext4/extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/extents.c +1 -1
@@ -5406,7 +5406,7 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len) goto out_mutex; } -truncate_pagecache_range (inode, offset,-1 ); +truncate_pagecache (inode, offset);/* Wait for existing dio to complete */ ext4_inode_block_unlocked_dio (inode);
Signature · 1 line
1.8.3.1
Quoted 7 lines · Lukas Czerner
We should be using
truncate_pagecache()instead oftruncate_pagecache_range()in the collapse range because we're truncating page cache from offset to the end of file.truncate_pagecache()also get rid of the private COWed pages from the range because we're going to shift the end of the file.Signed-off-by Lukas Czerner <[email protected]>
Thanks, applied.
- Ted