diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-09-03 03:23:41 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-09-03 03:23:41 -0400 |
commit | ae1ad26388228048db6a5f1056bd569ed2bbc4ec (patch) | |
tree | 223f50677aa00eb6f2a6529099a1005c7e43c071 /fs/nfs/proc.c | |
parent | c84b82dd3e593db217f23c60f7edae02c76a3c4c (diff) | |
parent | 089cf7f6ecb266b6a4164919a2e69bd2f938374a (diff) |
Merge tag 'v5.3-rc7' into x86/mm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/nfs/proc.c')
-rw-r--r-- | fs/nfs/proc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index 5552fa8b6e12..0f7288b94633 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c | |||
@@ -594,7 +594,8 @@ static int nfs_read_done(struct rpc_task *task, struct nfs_pgio_header *hdr) | |||
594 | /* Emulate the eof flag, which isn't normally needed in NFSv2 | 594 | /* Emulate the eof flag, which isn't normally needed in NFSv2 |
595 | * as it is guaranteed to always return the file attributes | 595 | * as it is guaranteed to always return the file attributes |
596 | */ | 596 | */ |
597 | if (hdr->args.offset + hdr->res.count >= hdr->res.fattr->size) | 597 | if ((hdr->res.count == 0 && hdr->args.count > 0) || |
598 | hdr->args.offset + hdr->res.count >= hdr->res.fattr->size) | ||
598 | hdr->res.eof = 1; | 599 | hdr->res.eof = 1; |
599 | } | 600 | } |
600 | return 0; | 601 | return 0; |
@@ -615,8 +616,10 @@ static int nfs_proc_pgio_rpc_prepare(struct rpc_task *task, | |||
615 | 616 | ||
616 | static int nfs_write_done(struct rpc_task *task, struct nfs_pgio_header *hdr) | 617 | static int nfs_write_done(struct rpc_task *task, struct nfs_pgio_header *hdr) |
617 | { | 618 | { |
618 | if (task->tk_status >= 0) | 619 | if (task->tk_status >= 0) { |
620 | hdr->res.count = hdr->args.count; | ||
619 | nfs_writeback_update_inode(hdr); | 621 | nfs_writeback_update_inode(hdr); |
622 | } | ||
620 | return 0; | 623 | return 0; |
621 | } | 624 | } |
622 | 625 | ||