summaryrefslogtreecommitdiffstats
path: root/fs/jfs/resize.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2011-06-23 22:51:47 +0200
committerJoel Becker <jlbec@evilplan.org>2011-07-28 11:07:19 +0200
commitc7e25e6e0b0486492c5faaf6312b37413642c48e (patch)
treec097a213a8eb2ad336fb2ef8046d2e71f0fa1f4a /fs/jfs/resize.c
parentocfs2: serialize unaligned aio (diff)
downloadlinux-c7e25e6e0b0486492c5faaf6312b37413642c48e.tar.xz
linux-c7e25e6e0b0486492c5faaf6312b37413642c48e.zip
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>
Diffstat (limited to 'fs/jfs/resize.c')
0 files changed, 0 insertions, 0 deletions