]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS: nfs_set_pgio_error sometimes misses errors
authorTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 17 Aug 2015 17:57:07 +0000 (12:57 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:33:29 +0000 (19:33 +0200)
commit085ebec6427f9c6fe682ce55b5cef57f8fc802b0
tree704be6c4fa4e1a7c78f92c7338273a5d73951504
parent149d62219aa23c04bf8884572edd4e7183f96acc
NFS: nfs_set_pgio_error sometimes misses errors

commit e9ae58aeee8842a50f7e199d602a5ccb2e41a95f upstream.

We should ensure that we always set the pgio_header's error field
if a READ or WRITE RPC call returns an error. The current code depends
on 'hdr->good_bytes' always being initialised to a large value, which
is not always done correctly by callers.
When this happens, applications may end up missing important errors.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/pagelist.c