[Devel] [PATCH 3/4] fs/fuse kio: style fix in pcs_fuse_submit()

Pavel Butsykin pbutsykin at virtuozzo.com
Wed May 15 11:53:57 MSK 2019


This patch simplifies pcs_fuse_submit() a little bit by replacing &r->req with
req, because here it's the same pointer.

Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
index e75eaf090d99..ba53a7ac6472 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -942,7 +942,7 @@ static void pcs_fuse_submit(struct pcs_fuse_cluster *pfc, struct fuse_req *req,
 	ireq = &r->exec.ireq;
 	ireq_init(di, ireq);
 
-	switch (r->req.in.h.opcode) {
+	switch (req->in.h.opcode) {
 	case FUSE_WRITE:
 	case FUSE_READ:
 		ret = pcs_fuse_prep_rw(r, ff);
@@ -959,7 +959,7 @@ static void pcs_fuse_submit(struct pcs_fuse_cluster *pfc, struct fuse_req *req,
 		struct fuse_fallocate_in *inarg = (void*) req->in.args[0].value;
 
 		if (pfc->fc->no_fallocate) {
-			r->req.out.h.error = -EOPNOTSUPP;
+			req->out.h.error = -EOPNOTSUPP;
 			goto error;
 		}
 
@@ -972,7 +972,7 @@ static void pcs_fuse_submit(struct pcs_fuse_cluster *pfc, struct fuse_req *req,
 		WARN_ON_ONCE(!mutex_is_locked(&fi->inode.i_mutex));
 		if (inarg->mode & (FALLOC_FL_ZERO_RANGE|FALLOC_FL_PUNCH_HOLE)) {
 			if ((inarg->offset & (PAGE_SIZE - 1)) || (inarg->length & (PAGE_SIZE - 1))) {
-				r->req.out.h.error = -EINVAL;
+				req->out.h.error = -EINVAL;
 				goto error;
 			}
 		}
@@ -999,7 +999,7 @@ static void pcs_fuse_submit(struct pcs_fuse_cluster *pfc, struct fuse_req *req,
 		goto submit;
 	case FUSE_IOCTL:
 		if (pfc->fc->no_fiemap) {
-			r->req.out.h.error = -EOPNOTSUPP;
+			req->out.h.error = -EOPNOTSUPP;
 			goto error;
 		}
 
@@ -1014,13 +1014,13 @@ static void pcs_fuse_submit(struct pcs_fuse_cluster *pfc, struct fuse_req *req,
 		}
 		break;
 	}
-	r->req.out.h.error = 0;
+	req->out.h.error = 0;
 error:
-	DTRACE("do fuse_request_end req:%p op:%d err:%d\n", &r->req, r->req.in.h.opcode, r->req.out.h.error);
+	DTRACE("do fuse_request_end req:%p op:%d err:%d\n", req, req->in.h.opcode, req->out.h.error);
 
 	if (lk)
 		spin_unlock(&pfc->fc->bg_lock);
-	request_end(pfc->fc, &r->req);
+	request_end(pfc->fc, req);
 	if (lk)
 		spin_lock(&pfc->fc->bg_lock);
 	return;
-- 
2.15.1



More information about the Devel mailing list