diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2014-01-22 20:41:57 +0900 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2015-05-02 14:36:13 +0200 |
commit | 9bf3f3686d8e9884c987dbda3a597d0860dbab64 (patch) | |
tree | 5a0a5be7af9788745891401b491001412e6f37f9 | |
parent | de7936c99f1692fe24fe555fe66cb93ee4d41c28 (diff) | |
download | kernel_samsung_tuna-9bf3f3686d8e9884c987dbda3a597d0860dbab64.zip kernel_samsung_tuna-9bf3f3686d8e9884c987dbda3a597d0860dbab64.tar.gz kernel_samsung_tuna-9bf3f3686d8e9884c987dbda3a597d0860dbab64.tar.bz2 |
f2fs: drop obsolete node page when it is truncated
If a node page is trucated, we'd better drop the page in the node_inode's page
cache for better memory footprint.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
-rw-r--r-- | fs/f2fs/node.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index f648f9b..4f8b137 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -518,6 +518,10 @@ invalidate: F2FS_SET_SB_DIRT(sbi); f2fs_put_page(dn->node_page, 1); + + invalidate_mapping_pages(NODE_MAPPING(sbi), + dn->node_page->index, dn->node_page->index); + dn->node_page = NULL; trace_f2fs_truncate_node(dn->inode, dn->nid, ni.blk_addr); } |