diff options
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 3ea6fc86a471..c3390e2c6e0d 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -3049,7 +3049,9 @@ again: } else { rc = cifs_readdata_to_iov(rdata, to); } - + /* if there was a short read -- discard anything left */ + if (rdata->got_bytes && rdata->got_bytes < rdata->bytes) + rc = -ENODATA; } list_del_init(&rdata->list); kref_put(&rdata->refcount, cifs_uncached_readdata_release); |