aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-01-22 20:41:57 +0900
committerrogersb11 <brettrogers11@gmail.com>2016-02-13 21:47:49 -0500
commit89cb46f958696f8e486cd5505a99396ea998e1f4 (patch)
tree09aec5483287397c2b9f36d82553632b5cf0ed1f /fs
parent1d488918bcdc4956a197f3dc58322187a7e354d8 (diff)
downloadkernel_samsung_smdk4412-89cb46f958696f8e486cd5505a99396ea998e1f4.zip
kernel_samsung_smdk4412-89cb46f958696f8e486cd5505a99396ea998e1f4.tar.gz
kernel_samsung_smdk4412-89cb46f958696f8e486cd5505a99396ea998e1f4.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. Change-Id: I3c7187676b5899c211857b9b94fad4f2a412e34d Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/node.c4
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);
}