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)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 19 Aug 2019 12:56:04 +0000 (08:56 -0400)
commiteb2c50da9e256dbbb3ff27694440e4c1900cfef8
treefb5c36bec2b2b8fdceeac4bc0e1fb74455b7e971
parentf4340e9314dbfadc48758945f85fc3b16612d06f
NFS: Ensure O_DIRECT reports an error if the bytes read/written is 0

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+
fs/nfs/direct.c
fs/nfs/pagelist.c