Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

NFSD: Use vfs_iocb_iter_read()

Refactor: Enable the use of IOCB flags to control NFSD's individual
read operations (when not using splice). This allows the eventual
use of atomic, uncached, direct, or asynchronous reads.

Suggested-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: NeilBrown <neil@brown.name>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Chuck Lever 37fe6f1b 61df439a

+5 -2
+5 -2
fs/nfsd/vfs.c
··· 1086 1086 { 1087 1087 unsigned long v, total; 1088 1088 struct iov_iter iter; 1089 - loff_t ppos = offset; 1089 + struct kiocb kiocb; 1090 1090 ssize_t host_err; 1091 1091 size_t len; 1092 + 1093 + init_sync_kiocb(&kiocb, file); 1094 + kiocb.ki_pos = offset; 1092 1095 1093 1096 v = 0; 1094 1097 total = *count; ··· 1107 1104 1108 1105 trace_nfsd_read_vector(rqstp, fhp, offset, *count); 1109 1106 iov_iter_bvec(&iter, ITER_DEST, rqstp->rq_bvec, v, *count); 1110 - host_err = vfs_iter_read(file, &iter, &ppos, 0); 1107 + host_err = vfs_iocb_iter_read(file, &kiocb, &iter); 1111 1108 return nfsd_finish_read(rqstp, fhp, file, offset, count, eof, host_err); 1112 1109 } 1113 1110