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>
This commit is contained in:
Родитель
68f313935f
Коммит
34b5d5c22d
|
@ -523,7 +523,7 @@ static int truncate_partial_data_page(struct inode *inode, u64 from,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (cache_only) {
|
if (cache_only) {
|
||||||
page = f2fs_grab_cache_page(mapping, index, false);
|
page = find_lock_page(mapping, index);
|
||||||
if (page && PageUptodate(page))
|
if (page && PageUptodate(page))
|
||||||
goto truncate_out;
|
goto truncate_out;
|
||||||
f2fs_put_page(page, 1);
|
f2fs_put_page(page, 1);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче