summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorRuss Knize <Russ.Knize@motorola.com>2013-09-24 22:49:23 +0200
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-09-25 10:51:24 +0200
commit52ab956000214aa111254e52e5eac3d91bd7cf4b (patch)
treef449477dc83760d163de59e629f68bb74696b36c /fs/f2fs/segment.c
parentf2fs: don't let the orphan inode counter underflow (diff)
downloadlinux-52ab956000214aa111254e52e5eac3d91bd7cf4b.tar.xz
linux-52ab956000214aa111254e52e5eac3d91bd7cf4b.zip
f2fs: don't GC or take an fs_lock from f2fs_initxattrs()
f2fs_initxattrs() is called internally from within F2FS and should not call functions that are used by VFS handlers. This avoids certain deadlocks: - vfs_create() - f2fs_create() <-- takes an fs_lock - f2fs_add_link() - __f2fs_add_link() - init_inode_metadata() - f2fs_init_security() - security_inode_init_security() - f2fs_initxattrs() - f2fs_setxattr() <-- also takes an fs_lock If the caller happens to grab the same fs_lock from the pool in both places, they will deadlock. There are also deadlocks involving multiple threads and mutexes: - f2fs_write_begin() - f2fs_balance_fs() <-- takes gc_mutex - f2fs_gc() - write_checkpoint() - block_operations() - mutex_lock_all() <-- blocks trying to grab all fs_locks - f2fs_mkdir() <-- takes an fs_lock - __f2fs_add_link() - f2fs_init_security() - security_inode_init_security() - f2fs_initxattrs() - f2fs_setxattr() - f2fs_balance_fs() <-- blocks trying to take gc_mutex Signed-off-by: Russ Knize <Russ.Knize@motorola.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/segment.c')
0 files changed, 0 insertions, 0 deletions