]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: Fix deadlock on umount
authorJan Kara <jack@suse.cz>
Mon, 20 Jul 2009 10:12:36 +0000 (12:12 +0200)
committerJoel Becker <joel.becker@oracle.com>
Tue, 21 Jul 2009 22:47:55 +0000 (15:47 -0700)
commitaba422bd7d3ced3149b88d30eb11c215ff24bea0
tree3d3ca30071d9d92ff3ad5c6d522ea6c05efb3885
parent5e6350d98512532245c7f305c1a75cc40ae210a7
ocfs2: Fix deadlock on umount

In commit b7a0bd6d24cecc8a5c42f8b9794fbd41884e9239, we moved the dentry lock
put process into ocfs2_wq. This causes problems during umount because ocfs2_wq
can drop references to inodes while they are being invalidated by
invalidate_inodes() causing all sorts of nasty things (invalidate_inodes()
ending in an infinite loop, "Busy inodes after umount" messages etc.).

We fix the problem by stopping ocfs2_wq from doing any further releasing of
inode references on the superblock being unmounted, wait until it finishes
the current round of releasing and finally cleaning up all the references in
dentry_lock_list from ocfs2_put_super().

The issue was tracked down by Tao Ma <tao.ma@oracle.com>.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/dcache.c
fs/ocfs2/dcache.h
fs/ocfs2/ocfs2.h
fs/ocfs2/super.c