rbd: don't NULL out ->obj_request in rbd_img_obj_parent_read_full()

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/d98f153f1a116f79e636edd34b4fec07e49ae9b2
Commit:     d98f153f1a116f79e636edd34b4fec07e49ae9b2
Parent:     a0c5895b27f6bbf8aa20a2c640845fc261740051
Refname:    refs/heads/master
Author:     Ilya Dryomov <[email protected]>
AuthorDate: Thu Jan 18 16:32:00 2018 +0100
Committer:  Ilya Dryomov <[email protected]>
CommitDate: Mon Jan 29 15:23:01 2018 +0100

    rbd: don't NULL out ->obj_request in rbd_img_obj_parent_read_full()
    
    If rbd_img_request_submit() fails, parent_request->obj_request is
    NULLed out, triggering an assert in rbd_obj_request_put():
    
      rbd_img_request_put(parent_request)
        rbd_parent_request_destroy
          rbd_obj_request_put(NULL)
    
    Just remove it -- parent_request->obj_request will be put in
    rbd_parent_request_destroy().
    
    Signed-off-by: Ilya Dryomov <[email protected]>
---
 drivers/block/rbd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 7646a2d3119c..4a886d8c4a3c 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2682,8 +2682,6 @@ static int rbd_img_obj_parent_read_full(struct rbd_obj_request *obj_request)
 
 	parent_request->copyup_pages = NULL;
 	parent_request->copyup_page_count = 0;
-	parent_request->obj_request = NULL;
-	rbd_obj_request_put(obj_request);
 out_err:
 	if (pages)
 		ceph_release_page_vector(pages, page_count);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.