diff options
author | Chao Yu <yuchao0@huawei.com> | 2016-04-29 14:09:15 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-03 20:20:05 +0200 |
commit | 23dc974eed576b2464b222a892272073adf6a92c (patch) | |
tree | f94695740e1865fe2e1eb4f2fd07353d6fb61600 | |
parent | f2fs: fix to return 0 if err == -ENOENT in f2fs_readdir (diff) | |
download | linux-23dc974eed576b2464b222a892272073adf6a92c.tar.xz linux-23dc974eed576b2464b222a892272073adf6a92c.zip |
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>
-rw-r--r-- | fs/f2fs/data.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |