From cfa418c952562035fe179c34b0acab73df8fd551 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Thu, 23 Jun 2011 22:51:47 +0200 Subject: [PATCH] --- yaml --- r: 276167 b: refs/heads/master c: c7e25e6e0b0486492c5faaf6312b37413642c48e h: refs/heads/master i: 276165: a89748c28a0908554de22b95fd944a566e832658 276163: 7d2ce3595eec9b42755367cfbdb09de500f3d413 276159: c9355d9efc64563789a23ed503cc237b80bebbfa v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/aops.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4f4d250aa661..bf24142ffc6d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a11f7e63c59810a81494d4c4b028af707d4c7ca4 +refs/heads/master: c7e25e6e0b0486492c5faaf6312b37413642c48e diff --git a/trunk/fs/ocfs2/aops.c b/trunk/fs/ocfs2/aops.c index 4c1ec8f2d8c1..ba3ca1e63b51 100644 --- a/trunk/fs/ocfs2/aops.c +++ b/trunk/fs/ocfs2/aops.c @@ -290,7 +290,15 @@ static int ocfs2_readpage(struct file *file, struct page *page) } if (down_read_trylock(&oi->ip_alloc_sem) == 0) { + /* + * Unlock the page and cycle ip_alloc_sem so that we don't + * busyloop waiting for ip_alloc_sem to unlock + */ ret = AOP_TRUNCATED_PAGE; + unlock_page(page); + unlock = 0; + down_read(&oi->ip_alloc_sem); + up_read(&oi->ip_alloc_sem); goto out_inode_unlock; }