]> git.baikalelectronics.ru Git - kernel.git/commit
don't busy retry the inode on failed grab_super_passive()
authorWu Fengguang <fengguang.wu@intel.com>
Sat, 30 Jul 2011 04:14:35 +0000 (22:14 -0600)
committerWu Fengguang <fengguang.wu@intel.com>
Sun, 31 Jul 2011 14:52:08 +0000 (22:52 +0800)
commit7089b30e3cee27dfe80895cf0f1bccc1f8cbf134
tree841ce0af67dfaef41e5297fdbfa52255a1343f0b
parent9d4a3986dca9e3246ec43f57a01bfd73d4b4c0ca
don't busy retry the inode on failed grab_super_passive()

This fixes a soft lockup on conditions

a) the flusher is working on a work by __bdi_start_writeback(), while

b) someone else calls writeback_inodes_sb*() or sync_inodes_sb(), which
   grab sb->s_umount and enqueue a new work for the flusher to execute

The s_umount grabbed by (b) will fail the grab_super_passive() in (a).
Then if the inode is requeued, wb_writeback() will busy retry on it.
As a result, wb_writeback() loops for ever without releasing
wb->list_lock, which further blocks other tasks.

Fix the busy loop by redirtying the inode. This may undesirably delay
the writeback of the inode, however most likely it will be picked up
soon by the queued work by writeback_inodes_sb*(), sync_inodes_sb() or
even writeback_inodes_wb().

bug url: http://www.spinics.net/lists/linux-fsdevel/msg47292.html

Reported-by: Christoph Hellwig <hch@infradead.org>
Tested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
fs/fs-writeback.c