f2fs: fix to clear private data in page
Private data in page should be removed during ->releasepage or ->invalidatepage, otherwise garbage data would be remained in that page. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -1723,6 +1723,7 @@ void f2fs_invalidate_page(struct page *page, unsigned int offset,
|
|||||||
if (IS_ATOMIC_WRITTEN_PAGE(page))
|
if (IS_ATOMIC_WRITTEN_PAGE(page))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
set_page_private(page, 0);
|
||||||
ClearPagePrivate(page);
|
ClearPagePrivate(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1736,6 +1737,7 @@ int f2fs_release_page(struct page *page, gfp_t wait)
|
|||||||
if (IS_ATOMIC_WRITTEN_PAGE(page))
|
if (IS_ATOMIC_WRITTEN_PAGE(page))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
set_page_private(page, 0);
|
||||||
ClearPagePrivate(page);
|
ClearPagePrivate(page);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user