All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miao Xie <miaox@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Subject: [PATCH 5/7] Btrfs: use bio_endio_nodec instead of open code
Date: Thu, 19 Jun 2014 10:42:53 +0800	[thread overview]
Message-ID: <1403145775-22641-6-git-send-email-miaox@cn.fujitsu.com> (raw)
In-Reply-To: <1403145775-22641-1-git-send-email-miaox@cn.fujitsu.com>

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
---
 fs/btrfs/volumes.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 19c298a..31f9036 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5399,12 +5399,6 @@ static void btrfs_end_bio(struct bio *bio, int err)
 			bio = bbio->orig_bio;
 		}
 
- 		/*
-		 * We have original bio now. So increment bi_remaining to
-		 * account for it in endio
-		 */
-		atomic_inc(&bio->bi_remaining);
-
 		bio->bi_private = bbio->private;
 		bio->bi_end_io = bbio->end_io;
 		btrfs_io_bio(bio)->mirror_num = bbio->mirror_num;
@@ -5422,8 +5416,7 @@ static void btrfs_end_bio(struct bio *bio, int err)
 			err = 0;
 		}
 		kfree(bbio);
-
-		bio_endio(bio, err);
+		bio_endio_nodec(bio, err);
 	} else if (!is_orig_bio) {
 		bio_put(bio);
 	}
-- 
1.9.3


  parent reply	other threads:[~2014-06-19  2:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19  2:42 [PATCH 0/7] random bugfixes Miao Xie
2014-06-19  2:42 ` [PATCH 1/7] Btrfs: make free space cache write out functions more readable Miao Xie
2014-06-19  2:42 ` [PATCH V3 2/7] Btrfs: fix broken free space cache after the system crashed Miao Xie
2014-06-19  2:42 ` [PATCH RESEND 3/7] btrfs: Skip scrubbing removed chunks to avoid -ENOENT Miao Xie
2014-06-19  2:42 ` [PATCH RESEND 4/7] Btrfs: fix NULL pointer crash when running balance and scrub concurrently Miao Xie
2014-06-19  2:42 ` Miao Xie [this message]
2014-06-19  2:42 ` [PATCH 6/7] Btrfs: fix deadlock when mounting a degraded fs Miao Xie
2014-06-19  9:15   ` Liu Bo
2014-06-19  2:42 ` [PATCH 7/7] Btrfs: fix wrong error handle when the device is missing or is not writeable Miao Xie

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=1403145775-22641-6-git-send-email-miaox@cn.fujitsu.com \
    --to=miaox@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.