diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-04-29 11:18:42 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-05-28 15:41:35 -0700 |
commit | 01f28610a1691078d0f7ba62b365567f8799f07c (patch) | |
tree | 5a97946706daa2904f3f112bd3c5025153109785 /block/bio-integrity.c | |
parent | eaa693f4dcf1ca64b41b02d907e9c401c085cf59 (diff) | |
download | op-kernel-dev-01f28610a1691078d0f7ba62b365567f8799f07c.zip op-kernel-dev-01f28610a1691078d0f7ba62b365567f8799f07c.tar.gz |
f2fs: fix race on allocating and deallocating a dentry block
There are two threads:
f2fs_delete_entry() get_new_data_page()
f2fs_reserve_block()
dn.blkaddr = XXX
lock_page(dentry_block)
truncate_hole()
dn.blkaddr = NULL
unlock_page(dentry_block)
lock_page(dentry_block)
fill the block from XXX address
add new dentries
unlock_page(dentry_block)
Later, f2fs_write_data_page() will truncate the dentry_block, since
its block address is NULL.
The reason for this was due to the wrong lock order.
In this case, we should do f2fs_reserve_block() after locking its dentry block.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'block/bio-integrity.c')
0 files changed, 0 insertions, 0 deletions