Now that pages from a killed request are no longer released, it's safe to write to these pages which though will be discarded later. However It makes the code simpler and cleaner without having to treat killed requests speciallly.
Related to #VSTOR-101450 Signed-off-by: Liu Kui <kui....@virtuozzo.com> --- fs/fuse/dev.c | 18 +----------------- fs/fuse/kio/pcs/pcs_krpc.c | 2 +- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 35e105e7661e..292709b337bd 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -2088,11 +2088,6 @@ static int copy_out_args(struct fuse_copy_state *cs, struct fuse_args *args, { unsigned reqsize = sizeof(struct fuse_out_header); - if (unlikely(args->killed)) { - cs->req->out.h.error = -EIO; - return 0; - } - reqsize += fuse_len_args(args->out_numargs, args->out_args); if (reqsize < nbytes || (reqsize > nbytes && !args->out_argvar)) @@ -2188,9 +2183,6 @@ static int copy_out_splices(struct fuse_copy_state *cs, struct fuse_args *args, int ioff = pipe->bufs[tail & mask].offset; int ilen = pipe->bufs[tail & mask].len; - if (unlikely(args->killed)) - goto skip_copy; - while (ilen > 0) { int copy = ilen; @@ -2215,7 +2207,6 @@ static int copy_out_splices(struct fuse_copy_state *cs, struct fuse_args *args, ioff += copy; ilen -= copy; } -skip_copy: put_page(ipage); pipe->bufs[tail & mask].ops = NULL; pipe->bufs[tail & mask].page = NULL; @@ -2230,9 +2221,7 @@ static int copy_out_splices(struct fuse_copy_state *cs, struct fuse_args *args, } } - if (unlikely(args->killed)) { - cs->req->out.h.error = -EIO; - } else if (args->page_zeroing && didx < ap->num_pages) { + if (args->page_zeroing && didx < ap->num_pages) { if (doff < dend) { void *dst = kmap_atomic(dpage); @@ -2272,11 +2261,6 @@ static int copy_out_krpczc(struct fuse_copy_state *cs, struct fuse_args *args, void *dst; int err; - if (unlikely(args->killed)) { - cs->req->out.h.error = -EIO; - return 0; - } - if (args->out_numargs != 1 || !args->out_pages) return -EINVAL; diff --git a/fs/fuse/kio/pcs/pcs_krpc.c b/fs/fuse/kio/pcs/pcs_krpc.c index 8c7c8f1da81b..a4c1e2c3b075 100644 --- a/fs/fuse/kio/pcs/pcs_krpc.c +++ b/fs/fuse/kio/pcs/pcs_krpc.c @@ -569,7 +569,7 @@ static int kreq_make_sendmsg(struct krpc_req *kreq) chunk->type = KRPC_CHUNK_TYPE_ZC; chunk->addr = chunk_bdzc->offset; chunk->req = fuse_dev_find_request(chunk_bdzc->devfd, chunk_bdzc->unique); - if (!chunk->req || chunk->req->args->killed) { + if (!chunk->req) { res = PCS_ERR_INV_PARAMS; goto err_free_data_chunk; } -- 2.39.5 (Apple Git-154) _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel