f2fs: add a bug_on in is_alive
PATCH 1/2 f2fs: add a bug_on in is_alive
This patch add a bug_on in is_alive in case of infinite loop.
Signed-off-by Yunlei He <[email protected]>
--- fs/f2fs/gc.c | 1 + 1 file changed, 1 insertion(+)
fs/f2fs/gc.c +1 -0
@@ -550,6 +550,7 @@ static bool is_alive(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,get_node_info (sbi, nid, dni);if (sum->version != dni->version) { +f2fs_bug_on (sbi, (sum->version +1 ) != dni->version);f2fs_put_page (node_page,1 );return false; }
Signature · 6 lines
2.10.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
PATCH 2/2 f2fs: use set_page_private marcro in f2fs_trace_pid
Use set_page_private marcro instead of operte page struct directly
Signed-off-by Yunlei He <[email protected]>
--- fs/f2fs/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/trace.c +1 -1
@@ -59,7 +59,7 @@ void f2fs_trace_pid(struct page *page)pid_t pid =task_pid_nr (current);void *p; - page->private = pid; +set_page_private (page, (unsigned long )pid);if (radix_tree_preload (GFP_NOFS ))return ;
Signature · 6 lines
2.10.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot