]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFS: Ensure O_DIRECT reports an error if the bytes read/written is 0
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 12 Aug 2019 22:04:36 +0000 (18:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:23:45 +0000 (10:23 +0200)
commit666a848c6797090c8bafdc1a14876b020f4dfac9
tree2deb4ed3fb0be6f8d698cce2a620bd5c06cd4032
parent3fd824dc16de2f1aa4607fcc7d17f833ea513cf8
NFS: Ensure O_DIRECT reports an error if the bytes read/written is 0

commit eb2c50da9e256dbbb3ff27694440e4c1900cfef8 upstream.

If the attempt to resend the I/O results in no bytes being read/written,
we must ensure that we report the error.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Fixes: 0a00b77b331a ("nfs: mirroring support for direct io")
Cc: stable@vger.kernel.org # v3.20+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/direct.c
fs/nfs/pagelist.c