Skip to content

Commit 1969823

Browse files
committed
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: Christoph Hellwig <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 62bf165 commit 1969823

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/nfsd/vfs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <linux/exportfs.h>
3232
#include <linux/writeback.h>
3333
#include <linux/security.h>
34+
#include <linux/sunrpc/xdr.h>
3435

3536
#include "xdr3.h"
3637

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

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

0 commit comments

Comments
 (0)