]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: avoid deadlock in f2fs_shrink_extent_tree
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 1 Dec 2015 00:26:44 +0000 (16:26 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 4 Dec 2015 19:52:36 +0000 (11:52 -0800)
commit98ed86476fa1645530ef12d112b936786ab7b6f9
treed836230fe63ec680631c681f821c8a41d84dbe6b
parent1de5b88a6e2469c53540e25ab15266d098994df5
f2fs: avoid deadlock in f2fs_shrink_extent_tree

While handling extent trees, we can enter into a reclaiming path anytime.
If it tries to release some extent nodes in the same extent tree,
write_lock(&et->lock) would be hanged.
In order to avoid the deadlock, we can just skip it.

Note that, if it is an unreferenced tree, we should get write_lock(&et->lock)
successfully and release all of therein nodes.

Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/extent_cache.c