Commit 1969823c authored by Chuck Lever's avatar Chuck Lever
Browse files

NFSD: Use rqstp->rq_bvec in nfsd_iter_write()



If we can get rid of all uses of rq_vec, then it can be removed.
Replace one use of rqstp::rq_vec with rqstp::rq_bvec.

The feeling of layering violation grows stronger now that
<linux/sunrpc/xdr.h> is included in fs/nfsd/vfs.c.

Suggested-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 62bf165c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include <linux/exportfs.h>
#include <linux/writeback.h>
#include <linux/security.h>
#include <linux/sunrpc/xdr.h>

#include "xdr3.h"

@@ -1206,8 +1207,8 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp,
	if (stable && !fhp->fh_use_wgather)
		flags |= RWF_SYNC;

	nvecs = svc_fill_write_vector(rqstp, payload);
	iov_iter_kvec(&iter, ITER_SOURCE, rqstp->rq_vec, nvecs, *cnt);
	nvecs = xdr_buf_to_bvec(rqstp->rq_bvec, rqstp->rq_maxpages, payload);
	iov_iter_bvec(&iter, ITER_SOURCE, rqstp->rq_bvec, nvecs, *cnt);
	since = READ_ONCE(file->f_wb_err);
	if (verf)
		nfsd_copy_write_verifier(verf, nn);