Commit 9337d5d3 authored by Lukas Czerner's avatar Lukas Czerner Committed by Theodore Ts'o

ext4: no need to truncate pagecache twice in collapse range

We're already calling truncate_pagecache() before we attempt to do any
actual job so there is not need to truncate pagecache once more using
truncate_setsize() after we're finished.

Remove truncate_setsize() and replace it just with i_size_write() note
that we're holding appropriate locks.
Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 2c1d2328
......@@ -5474,7 +5474,7 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len)
}
new_size = i_size_read(inode) - len;
truncate_setsize(inode, new_size);
i_size_write(inode, new_size);
EXT4_I(inode)->i_disksize = new_size;
ext4_discard_preallocations(inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment