summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Jeffery <djeffery@redhat.com>2014-08-05 11:19:42 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-08-22 18:04:44 -0400
commit92a56555bd576c61b27a5cab9f38a33a1e9a1df5 (patch)
treed25e9c5821615dcb0e48d37373f36a0baa7f3e85
parent78270e8fbc2916bfc8305b8f58f33474cce1ec0e (diff)
downloadop-kernel-dev-92a56555bd576c61b27a5cab9f38a33a1e9a1df5.zip
op-kernel-dev-92a56555bd576c61b27a5cab9f38a33a1e9a1df5.tar.gz
nfs: Don't busy-wait on SIGKILL in __nfs_iocounter_wait
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>
-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 932c6cc..be7cbce 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -116,7 +116,7 @@ __nfs_iocounter_wait(struct nfs_io_counter *c)
if (atomic_read(&c->io_count) == 0)
break;
ret = nfs_wait_bit_killable(&q.key);
- } while (atomic_read(&c->io_count) != 0);
+ } while (atomic_read(&c->io_count) != 0 && !ret);
finish_wait(wq, &q.wait);
return ret;
}
OpenPOWER on IntegriCloud