linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 3/4] btrfs: Remove redundan bio_get/bio_set pair from submit_one_bio
Date: Wed, 13 Dec 2017 10:25:39 +0200	[thread overview]
Message-ID: <1513153540-10737-4-git-send-email-nborisov@suse.com> (raw)
In-Reply-To: <1513153540-10737-1-git-send-email-nborisov@suse.com>

The bio is never referenced after it has been submitted so there is no
point in getting an extra reference.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 fs/btrfs/extent_io.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 16ae832bdb5d..c2fe059f9c92 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2732,7 +2732,6 @@ static int __must_check submit_one_bio(struct bio *bio, int mirror_num,
 	start = page_offset(page) + bvec->bv_offset;
 
 	bio->bi_private = NULL;
-	bio_get(bio);
 
 	if (tree->ops)
 		ret = tree->ops->submit_bio_hook(tree->private_data, bio,
@@ -2740,7 +2739,6 @@ static int __must_check submit_one_bio(struct bio *bio, int mirror_num,
 	else
 		btrfsic_submit_bio(bio);
 
-	bio_put(bio);
 	return blk_status_to_errno(ret);
 }
 
-- 
2.7.4


  parent reply	other threads:[~2017-12-13  8:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13  8:25 [PATCH 0/4] Cleanup of bio_get/set Nikolay Borisov
2017-12-13  8:25 ` [PATCH 1/4] btrfs: Remove redundant bio_get/set calls in compressed read/write paths Nikolay Borisov
2017-12-13  8:25 ` [PATCH 2/4] btrfs: Remove redundant bio_get/set from submit_dio_repair_bio Nikolay Borisov
2017-12-13  8:25 ` Nikolay Borisov [this message]
2017-12-13  8:25 ` [PATCH 4/4] btrfs: Remove redundant pair of bio_get/set in __btrfs_submit_dio_bio Nikolay Borisov
2018-01-02 15:40 ` [PATCH 0/4] Cleanup of bio_get/set David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1513153540-10737-4-git-send-email-nborisov@suse.com \
    --to=nborisov@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).