projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branches 'spi/topic/flash-dma', 'spi/topic/imx', 'spi/topic...
[deliverable/linux.git]
/
fs
/
nfs
/
direct.c
diff --git
a/fs/nfs/direct.c
b/fs/nfs/direct.c
index 979b3c4dee6aedbb354faefd1aca8cf1b3be8789..c7326c2af2c3d33df7a96497c427664d90f7861f 100644
(file)
--- 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);
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->error;
- if (!result)
- result = dreq->count;
out:
return (ssize_t) result;
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 (dreq->iocb) {
long res = (long) dreq->error;
- if (
!res)
+ if (
dreq->count != 0) {
res = (long) dreq->count;
res = (long) dreq->count;
+ WARN_ON_ONCE(dreq->count < 0);
+ }
dreq->iocb->ki_complete(dreq->iocb, res, 0);
}
dreq->iocb->ki_complete(dreq->iocb, res, 0);
}
This page took
0.024502 seconds
and
5
git commands to generate.