[RFC PATCH 1/5] netfs: don't error out on short DIO reads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There's no reason that userland can't request to read beyond the EOF. A
short read is expected in that situation.

Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
 fs/netfs/io.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/fs/netfs/io.c b/fs/netfs/io.c
index aaaafc3e1601..b94f2d27127e 100644
--- a/fs/netfs/io.c
+++ b/fs/netfs/io.c
@@ -728,11 +728,6 @@ ssize_t netfs_begin_read(struct netfs_io_request *rreq, bool sync)
 		}
 
 		ret = rreq->error;
-		if (ret == 0 && rreq->submitted < rreq->len &&
-		    rreq->origin == NETFS_DIO_READ) {
-			trace_netfs_failure(rreq, NULL, ret, netfs_fail_short_read);
-			ret = -EIO;
-		}
 		if (ret == 0)
 			ret = netfs_dio_copy_to_dest(rreq);
 		if (ret == 0) {
-- 
2.35.1

--
Linux-cachefs mailing list
Linux-cachefs@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-cachefs




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]
  Powered by Linux