]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: avoid potential deadlock in f2fs_move_file_range
authorChao Yu <yuchao0@huawei.com>
Thu, 4 Aug 2016 12:13:03 +0000 (20:13 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 19 Aug 2016 02:15:08 +0000 (11:15 +0900)
commit8fe123185ea0f3fbace48eb69802f53a24bc8979
treeb31648702d4d9267f5d0f078c5db9ce9aad082f2
parentfb4f25c13bc1b65fc9fcc2b7b1dc9c1e317a4001
f2fs: avoid potential deadlock in f2fs_move_file_range

Thread A Thread B
- inode_lock fileA
- inode_lock fileB
 - inode_lock fileA
 - inode_lock fileB

We may encounter above potential deadlock during moving file range in
concurrent scenario. This patch fixes the issue by using inode_trylock
instead.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c