diff options
author | Lukas Czerner <lczerner@redhat.com> | 2014-04-18 10:48:25 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-04-18 10:48:25 -0400 |
commit | 9337d5d31ab798f0c74150506371551a9195251a (patch) | |
tree | d43f80bd83d31e4a426ff023b0b94fe5b8f132c6 /fs/ext4 | |
parent | 2c1d23289bc2f7cfa358bc856b87a992dcb11ad5 (diff) |
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: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/extents.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index c6f624582d37..3ee60e2e2ac7 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -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); |