kernel-hacking-2024-linux-s.../fs/f2fs
Jaegeuk Kim 01f28610a1 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>
2015-05-28 15:41:35 -07:00
..
acl.c f2fs: make posix_acl_create() safer and cleaner 2015-05-07 11:38:31 -07:00
acl.h f2fs: avoid deadlock on init_inode_metadata 2014-11-03 16:07:33 -08:00
checkpoint.c f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
data.c f2fs: fix race on allocating and deallocating a dentry block 2015-05-28 15:41:35 -07:00
debug.c f2fs: add stat info for moved blocks by background gc 2015-04-10 15:08:32 -07:00
dir.c f2fs: assign parent's i_mode for empty dir 2015-04-10 15:08:58 -07:00
f2fs.h f2fs: introduce dot and dotdot name check 2015-05-28 15:41:34 -07:00
file.c f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
gc.c f2fs: move get_page for gc victims 2015-05-28 15:41:33 -07:00
gc.h f2fs: fix sparse warnings 2015-02-11 17:04:49 -08:00
hash.c f2fs: introduce dot and dotdot name check 2015-05-28 15:41:34 -07:00
inline.c f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
inode.c f2fs: fix sparse warnings 2015-04-10 15:08:55 -07:00
Kconfig f2fs: relocate Kconfig from misc filesystems 2015-04-10 15:08:35 -07:00
Makefile f2fs: add f2fs_io_tracer support 2015-01-09 17:02:24 -08:00
namei.c f2fs: add f2fs_may_inline_{data, dentry} 2015-05-28 15:41:32 -07:00
node.c f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
node.h f2fs: move existing definitions into f2fs.h 2015-05-28 15:41:27 -07:00
recovery.c f2fs: use is_valid_blkaddr to verify blkaddr for readability 2015-05-07 11:38:32 -07:00
segment.c f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
segment.h f2fs: reduce searching region of segmap when set free section 2015-04-10 15:08:36 -07:00
super.c f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
trace.c f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
trace.h f2fs: add sbi and page pointer in f2fs_io_info 2015-05-28 15:41:32 -07:00
xattr.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-04-26 17:22:07 -07:00
xattr.h f2fs: avoid deadlock on init_inode_metadata 2014-11-03 16:07:33 -08:00