From: Chao Yu Date: Tue, 27 May 2014 00:41:07 +0000 (+0800) Subject: f2fs: avoid crash when trace f2fs_submit_page_mbio event in ra_sum_pages X-Git-Tag: omap-for-v3.16/fixes-against-rc1~73^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bac4eef6537a663585f3fb3d633a629c72e3b73d;p=pandora-kernel.git f2fs: avoid crash when trace f2fs_submit_page_mbio event in ra_sum_pages Previously we allocate pages with no mapping in ra_sum_pages(), so we may encounter a crash in event trace of f2fs_submit_page_mbio where we access mapping data of the page. We'd better allocate pages in bd_inode mapping and invalidate these pages after we restore data from pages. It could avoid crash in above scenario. Changes from V1 o remove redundant code in ra_sum_pages() suggested by Jaegeuk Kim. Call Trace: [] ? ftrace_raw_event_f2fs_write_checkpoint+0x80/0x80 [f2fs] [] f2fs_submit_page_mbio+0x1cb/0x200 [f2fs] [] restore_node_summary+0x13a/0x280 [f2fs] [] build_curseg+0x2bd/0x620 [f2fs] [] build_segment_manager+0x1cb/0x920 [f2fs] [] f2fs_fill_super+0x535/0x8e0 [f2fs] [] mount_bdev+0x16a/0x1a0 [] f2fs_mount+0x1f/0x30 [f2fs] [] mount_fs+0x36/0x170 [] vfs_kern_mount+0x55/0xe0 [] do_mount+0x1e8/0x900 [] SyS_mount+0x82/0xc0 [] sysenter_do_call+0x12/0x22 Suggested-by: Jaegeuk Kim Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- Reading git-diff-tree failed