diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-05-13 08:38:35 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-05-28 15:03:00 +0900 |
commit | 650495dedc34daf8590c708a5b48f82ed2787b75 (patch) | |
tree | a0500f2ff48558419d3bec3a81c981ab9cb778a3 /fs/f2fs/recovery.c | |
parent | 65e5cd0a151d53d3d79ef4d81783d1dbc01d4b61 (diff) | |
download | linux-650495dedc34daf8590c708a5b48f82ed2787b75.tar.bz2 |
f2fs: fix the inconsistent state of data pages
In get_lock_data_page, if there is a data race between get_dnode_of_data for
node and grab_cache_page for data, f2fs is able to face with the following
BUG_ON(dn.data_blkaddr == NEW_ADDR).
kernel BUG at /home/zeus/f2fs_test/src/fs/f2fs/data.c:251!
[<ffffffffa044966c>] get_lock_data_page+0x1ec/0x210 [f2fs]
Call Trace:
[<ffffffffa043b089>] f2fs_readdir+0x89/0x210 [f2fs]
[<ffffffff811a0920>] ? fillonedir+0x100/0x100
[<ffffffff811a0920>] ? fillonedir+0x100/0x100
[<ffffffff811a07f8>] vfs_readdir+0xb8/0xe0
[<ffffffff811a0b4f>] sys_getdents+0x8f/0x110
[<ffffffff816d7999>] system_call_fastpath+0x16/0x1b
This bug is able to be occurred when the block address of the data block is
changed after f2fs_put_dnode().
In order to avoid that, this patch fixes the lock order of node and data
blocks in which the node block lock is covered by the data block lock.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/recovery.c')
0 files changed, 0 insertions, 0 deletions