linux-stable/fs/f2fs
Jaegeuk Kim 6437d1b0ad f2fs: fix to do build_stat prior to the recovery procedure
At the end of the recovery procedure, write_checkpoint is called and updates
the cp count which is managed by f2fs stat.
But, previously build_stat() is called after the recovery procedure, which
results in:

BUG: unable to handle kernel NULL pointer dereference at 000000000000012c
IP: [<ffffffffa03b1030>] write_checkpoint+0x720/0xbc0 [f2fs]
Call Trace:
 [<ffffffff810a6b44>] ? mark_held_locks+0x74/0x140
 [<ffffffff8109a3e0>] ? __init_waitqueue_head+0x60/0x60
 [<ffffffffa03bf036>] recover_fsync_data+0x656/0xf20 [f2fs]
 [<ffffffff812ee3eb>] ? security_d_instantiate+0x1b/0x30
 [<ffffffffa03aeb4d>] f2fs_fill_super+0x94d/0xa00 [f2fs]
 [<ffffffff811a9825>] mount_bdev+0x1a5/0x1f0
 [<ffffffff8114915e>] ? __get_free_pages+0xe/0x40
 [<ffffffffa03ae200>] ? f2fs_remount+0x130/0x130 [f2fs]
 [<ffffffffa03aa575>] f2fs_mount+0x15/0x20 [f2fs]
 [<ffffffff811aa713>] mount_fs+0x43/0x1b0
 [<ffffffff811c7124>] vfs_kern_mount+0x74/0x160
 [<ffffffff811c5cb1>] ? __get_fs_type+0x51/0x60
 [<ffffffff811c9727>] do_mount+0x237/0xb50
 [<ffffffff811c936a>] ? copy_mount_options+0x3a/0x170

So, this patche changes the order of recovery_fsync_data() and
f2fs_build_stats().

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2014-02-24 16:00:39 +09:00
..
Kconfig f2fs: introduce CONFIG_F2FS_CHECK_FS for BUG_ON control 2013-10-29 15:43:01 +09:00
Makefile f2fs: key functions to handle inline data 2013-12-26 20:40:09 +09:00
acl.c f2fs: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
acl.h f2fs: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
checkpoint.c f2fs: show counts of checkpoint in status 2014-02-17 14:58:53 +09:00
data.c f2fs: fix not to write data pages on the page reclaiming path 2014-02-24 16:00:33 +09:00
debug.c f2fs: show counts of checkpoint in status 2014-02-17 14:58:53 +09:00
dir.c f2fs: clean up redundant function call 2014-02-17 14:58:53 +09:00
f2fs.h f2fs: show counts of checkpoint in status 2014-02-17 14:58:53 +09:00
file.c f2fs: use inode mutex to keep atomicity of f2fs_falloc 2014-02-17 14:58:53 +09:00
gc.c f2fs: clean up redundant function call 2014-02-17 14:58:53 +09:00
gc.h f2fs: add a sysfs entry to control max_victim_search 2014-01-08 13:45:08 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inline.c f2fs: remove the needless parameter of f2fs_wait_on_page_writeback 2014-01-14 17:45:54 +09:00
inode.c f2fs: update_inode_page should be done all the time 2014-02-17 14:58:51 +09:00
namei.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-01-28 08:38:04 -08:00
node.c f2fs: fix the calculation of max_nids 2014-02-17 14:58:53 +09:00
node.h f2fs: update several comments 2013-12-23 10:26:03 +09:00
recovery.c f2fs: fix a build warning 2014-02-17 14:58:52 +09:00
segment.c f2fs: introduce ra_meta_pages to readahead CP/NAT/SIT pages 2014-02-17 14:58:53 +09:00
segment.h f2fs: clean up with a macro 2014-02-17 14:58:52 +09:00
super.c f2fs: fix to do build_stat prior to the recovery procedure 2014-02-24 16:00:39 +09:00
xattr.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-01-28 08:38:04 -08:00
xattr.h f2fs: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00