From: Chao Yu Date: Fri, 29 Apr 2016 12:09:15 +0000 (+0800) Subject: f2fs: fix to clear private data in page X-Git-Tag: v4.7-rc1~84^2~48 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=23dc974eed576b2464b222a892272073adf6a92c;p=karo-tx-linux.git 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 Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 38ce5d6f8583..888f1781ae0b 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1723,6 +1723,7 @@ void f2fs_invalidate_page(struct page *page, unsigned int offset, if (IS_ATOMIC_WRITTEN_PAGE(page)) return; + set_page_private(page, 0); ClearPagePrivate(page); } @@ -1736,6 +1737,7 @@ int f2fs_release_page(struct page *page, gfp_t wait) if (IS_ATOMIC_WRITTEN_PAGE(page)) return 0; + set_page_private(page, 0); ClearPagePrivate(page); return 1; }