summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-01-22 20:41:57 +0900
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-01-23 08:04:21 +0900
commitbf39c00a9a7f3cdb5ce7d6695d9f044daf8f0b53 (patch)
tree7dc60525c2b7e2dc24d2858395c7443b9e39907c /fs
parent4ef51a8fcc7c54ca3ad948a8b4310b3bd5490c72 (diff)
downloadlinux-stable-bf39c00a9a7f3cdb5ce7d6695d9f044daf8f0b53.tar.gz
linux-stable-bf39c00a9a7f3cdb5ce7d6695d9f044daf8f0b53.tar.bz2
linux-stable-bf39c00a9a7f3cdb5ce7d6695d9f044daf8f0b53.zip
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>
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 bbfc655493dc..b0649b76eb4f 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);
}