summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorDavid Jeffery <djeffery@redhat.com>2014-08-05 11:19:42 -0400
committerJiri Slaby <jslaby@suse.cz>2014-10-17 09:21:08 +0200
commitf8af8eeb8306a965973c3061630d6975cab5e76c (patch)
tree97222c7881dabdf903054ca7df900a4902814da0 /fs/nfs
parent645ccc08110dd0f49c2d94e58f26d567921d5a5f (diff)
nfs: Don't busy-wait on SIGKILL in __nfs_iocounter_wait
commit 92a56555bd576c61b27a5cab9f38a33a1e9a1df5 upstream. If a SIGKILL is sent to a task waiting in __nfs_iocounter_wait, it will busy-wait or soft lockup in its while loop. nfs_wait_bit_killable won't sleep, and the loop won't exit on the error return. Stop the busy-wait by breaking out of the loop when nfs_wait_bit_killable returns an error. Signed-off-by: David Jeffery <djeffery@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Cc: Neil Brown <nfbrown@suse.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/pagelist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 2ffebf2081ce..27d7f2742592 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -113,7 +113,7 @@ __nfs_iocounter_wait(struct nfs_io_counter *c)
if (atomic_read(&c->io_count) == 0)
break;
ret = nfs_wait_bit_killable(&c->flags);
- } while (atomic_read(&c->io_count) != 0);
+ } while (atomic_read(&c->io_count) != 0 && !ret);
finish_wait(wq, &q.wait);
return ret;
}