[Devel] [PATCH RHEL7 COMMIT] fuse: fuse_request_send_background() must clear FR_PENDING

Konstantin Khorenko khorenko at virtuozzo.com
Wed Dec 6 17:36:51 MSK 2017


The commit is pushed to "branch-rh7-3.10.0-693.11.1.vz7.39.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.11.1.vz7.39.1
------>
commit 757e78c1900a560eadf4d45390f4a8ebe28ef15d
Author: Maxim Patlasov <mpatlasov at virtuozzo.com>
Date:   Wed Dec 6 17:36:51 2017 +0300

    fuse: fuse_request_send_background() must clear FR_PENDING
    
    Any caller who wants to request_end() a request before
    fuse_dev_do_read() has seen it, must clear FR_PENDING
    bit explicitly.
    
    fuse_abort_iqueue() already does so, fuse_request_send_background()
    must do it as well. Otherwise request_end() hits WARN_ON.
    
    https://jira.sw.ru/browse/PSBM-78342
    https://jira.sw.ru/browse/PSBM-74661
    https://jira.sw.ru/browse/PSBM-74660
    https://jira.sw.ru/browse/PSBM-74226
    
    Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
---
 fs/fuse/dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 3427eddcfb17..7d74782c6f43 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -542,6 +542,7 @@ void fuse_request_send_background(struct fuse_conn *fc, struct fuse_req *req)
 		BUG_ON(req->in.h.opcode != FUSE_READ);
 		req->out.h.error = -EIO;
 		__clear_bit(FR_BACKGROUND, &req->flags);
+		__clear_bit(FR_PENDING, &req->flags);
 		list_del_init(&req->list);
 		spin_unlock(&fc->lock);
 		request_end(fc, req);


More information about the Devel mailing list