[RHEL8,COMMIT] fs/fuse kio: missing ireq's completion_data initialization

Submitted by Konstantin Khorenko on Sept. 24, 2020, 8:44 a.m.

Details

Message ID 202009240844.08O8ivIV333576@finist-co8.sw.ru
State New
Series "fs/fuse kio: missing ireq's completion_data initialization"
Headers show

Commit Message

Konstantin Khorenko Sept. 24, 2020, 8:44 a.m.
The commit is pushed to "branch-rh8-4.18.0-193.6.3.vz8.4.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-193.6.3.vz8.4.7
------>
commit c83cc877cf576940623ce7eafb394b2d16b31717
Author: Ildar Ismagilov <ildar.ismagilov@virtuozzo.com>
Date:   Thu Feb 27 15:36:14 2020 +0300

    fs/fuse kio: missing ireq's completion_data initialization
    
    In case of fiemap request the completion_data field isn't initalized
    and because of it the ireq_retry_inc (which is called from
    pcs_sreq_complete) works incorrect.
    
    https://jira.sw.ru/browse/PSBM-100294
    
    Signed-off-by: Ildar Ismagilov <ildar.ismagilov@virtuozzo.com>
    (cherry picked from commit decd95b5d52fd4aa99e677954d44bdc5043decd2)
    Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_cluster.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/kio/pcs/pcs_cluster.c b/fs/fuse/kio/pcs/pcs_cluster.c
index b15a9cb170d8..65d9288cb88d 100644
--- a/fs/fuse/kio/pcs/pcs_cluster.c
+++ b/fs/fuse/kio/pcs/pcs_cluster.c
@@ -289,6 +289,8 @@  static void process_ireq_fiemap(struct pcs_int_request *orig_ireq)
 	fiter->ireq.type = PCS_IREQ_API;
 	fiter->ireq.apireq.req = &fiter->apireq;
 	fiter->ireq.completion_data.parent = NULL;
+	fiter->ireq.completion_data.ctx = orig_ireq->completion_data.ctx;
+	fiter->ireq.completion_data.priv = orig_ireq->completion_data.priv;
 	fiter->ireq.complete_cb = fiemap_iter_done;
 	fiter->apireq.datasource = fiter;
 	fiter->apireq.get_iter = fiemap_get_iter;