diff options
-rw-r--r-- | fs/nfs/direct.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 88d5d1c7f987..4d726e9db295 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -890,6 +890,8 @@ ssize_t nfs_file_direct_write(struct kiocb *iocb, const struct iovec *iov, retval = generic_write_checks(file, &pos, &count, 0); if (retval) goto out; + if (!count) + goto out; /* return 0 */ retval = -EINVAL; if ((ssize_t) count < 0) |