Jan Kara c7e25e6e0b ocfs2: Avoid livelock in ocfs2_readpage()
When someone writes to an inode, readers accessing the same inode via
ocfs2_readpage() just busyloop trying to get ip_alloc_sem because
do_generic_file_read() looks up the page again and retries ->readpage()
when previous attempt failed with AOP_TRUNCATED_PAGE. When there are enough
readers, they can occupy all CPUs and in non-preempt kernel the system is
deadlocked because writer holding ip_alloc_sem is never run to release the
semaphore. Fix the problem by making reader block on ip_alloc_sem to break
the busy loop.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
2011-07-28 02:07:19 -07:00
..
2011-05-23 23:37:20 -07:00
2011-07-28 02:07:16 -07:00
2011-07-28 02:07:16 -07:00
2011-03-31 11:26:23 -03:00
2011-07-28 02:07:16 -07:00
2011-05-31 19:03:45 -07:00
2011-03-31 11:26:23 -03:00
2011-03-07 16:43:21 +08:00
2011-02-21 11:18:23 +08:00
2011-02-22 21:59:46 +08:00
2011-03-31 11:26:23 -03:00
2011-05-23 23:37:20 -07:00
2011-05-31 19:03:45 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-07-28 02:07:16 -07:00
2011-03-07 16:43:21 +08:00
2011-02-24 16:22:20 +08:00
2011-03-31 11:26:23 -03:00