summaryrefslogtreecommitdiff
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-09-12 19:35:58 +0400
committerJaegeuk Kim <jaegeuk@kernel.org>2014-09-16 15:10:47 +0400
commit60979115a69e0e7916a1c1796f902264f1350977 (patch)
tree2ad30495672aee3a7e7822b7cd3eb5c2fdcbd543 /fs/f2fs/f2fs.h
parentc6e489305eb5ed029002b037e36800032a994bb4 (diff)
downloadlinux-60979115a69e0e7916a1c1796f902264f1350977.tar.xz
f2fs: fix double lock for inode page during roll-foward recovery
If the inode is same and its data index are needed to truncate, we can fall into double lock for its inode page via get_dnode_of_data. Error case is like this. 1. write data 1, 2, 3, 4, 5 in inode #4. 2. write data 100, 102, 103, 104, 105 in dnode #6 of inode #4. 3. sync 4. update data 100->106 in dnode #6. 5. fsync inode #4. 6. power-cut -> Then, 1. go back to #3's checkpoint 2. in do_recover_data, get_dnode_of_data() gets inode #4. 3. detect 100->106 in dnode #6. 4. check_index_in_prev_nodes tries to truncate 100 in dnode #6. 5. to trigger truncate_hole, get_dnode_of_data should grab inode #4. 6. detect *kernel hang* This patch should resolve that bug. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
0 files changed, 0 insertions, 0 deletions