diff options
author | Ingo Molnar | 2016-07-07 08:58:23 +0200 |
---|---|---|
committer | Ingo Molnar | 2016-07-07 08:58:23 +0200 |
commit | 3ebe3bd8fbd51b5e04e93c7f3fb90bd096a86344 (patch) | |
tree | 41b67e7a92f1935b1d5acdc714de1b13f657b7af /fs/nfs/direct.c | |
parent | c50f62454f4b489422333cb2e31401d87456bfa1 (diff) | |
parent | 2c81a6477081966fe80b8c6daa68459bca896774 (diff) |
Merge branch 'perf/urgent' into perf/core, to pick up fixes before merging new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/nfs/direct.c')
-rw-r--r-- | fs/nfs/direct.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 979b3c4dee6a..c7326c2af2c3 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -353,10 +353,12 @@ static ssize_t nfs_direct_wait(struct nfs_direct_req *dreq) result = wait_for_completion_killable(&dreq->completion); + if (!result) { + result = dreq->count; + WARN_ON_ONCE(dreq->count < 0); + } if (!result) result = dreq->error; - if (!result) - result = dreq->count; out: return (ssize_t) result; @@ -386,8 +388,10 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq, bool write) if (dreq->iocb) { long res = (long) dreq->error; - if (!res) + if (dreq->count != 0) { res = (long) dreq->count; + WARN_ON_ONCE(dreq->count < 0); + } dreq->iocb->ki_complete(dreq->iocb, res, 0); } |