aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim2016-09-06 15:55:54 -0700
committerJaegeuk Kim2016-09-12 10:30:39 -0700
commit34b5d5c22d64273319a525cb4e9f2d073df9f4a0 (patch)
tree504d4dbc5b217d7de478ab5c4d49a2ca9a2f945b /fs/f2fs
parent68f313935fb205822ed1f923f7833639f3c78573 (diff)
f2fs: avoid page allocation for truncating partial inline_data
When truncating cached inline_data, we don't need to allocate a new page all the time. Instead, it must check its page cache only. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index b74e985213f4..3b62949dfb07 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -523,7 +523,7 @@ static int truncate_partial_data_page(struct inode *inode, u64 from,
return 0;
if (cache_only) {
- page = f2fs_grab_cache_page(mapping, index, false);
+ page = find_lock_page(mapping, index);
if (page && PageUptodate(page))
goto truncate_out;
f2fs_put_page(page, 1);