diff options
| author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-06 15:55:54 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:34:04 +0200 |
| commit | 1b990d816f3bffe42b343a474b3fb4a4904e27de (patch) | |
| tree | 9844bed7bc6db1a050d55a2b50aa320dc4ccfe35 | |
| parent | 4c3ae8d87e127e648caa06999ac5fdf22a3097fc (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>
| -rw-r--r-- | fs/f2fs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 10e895d80..90730857e 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -543,7 +543,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); |
