* [PATCH] f2fs: drop obsolete node page when it is truncated
@ 2014-01-23 0:16 Jaegeuk Kim
0 siblings, 0 replies; only message in thread
From: Jaegeuk Kim @ 2014-01-23 0:16 UTC (permalink / raw)
Cc: Jaegeuk Kim, linux-fsdevel, linux-kernel, linux-f2fs-devel
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>
---
fs/f2fs/node.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index bbfc655..b0649b7 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);
}
--
1.8.4.474.g128a96c
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-01-23 0:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-23 0:16 [PATCH] f2fs: drop obsolete node page when it is truncated Jaegeuk Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).