public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Qian Cai <cai@lca.pw>
Cc: hch@lst.de, darrick.wong@oracle.com, david@fromorbit.com,
	linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: memory leaks from xfs_rw_bdev()
Date: Mon, 8 Jul 2019 23:35:15 +0200	[thread overview]
Message-ID: <20190708213515.GB18177@lst.de> (raw)
In-Reply-To: <1562616489.8510.15.camel@lca.pw>

We actually have a discussion on that in another thread, but if you
can easily reproduce the issue, can you test the patch below?

diff --git a/fs/xfs/xfs_bio_io.c b/fs/xfs/xfs_bio_io.c
index 757c1d9293eb..e2148f2d5d6b 100644
--- a/fs/xfs/xfs_bio_io.c
+++ b/fs/xfs/xfs_bio_io.c
@@ -43,7 +43,7 @@ xfs_rw_bdev(
 			bio_copy_dev(bio, prev);
 			bio->bi_iter.bi_sector = bio_end_sector(prev);
 			bio->bi_opf = prev->bi_opf;
-			bio_chain(bio, prev);
+			bio_chain(prev, bio);
 
 			submit_bio(prev);
 		}

  reply	other threads:[~2019-07-08 21:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 20:08 memory leaks from xfs_rw_bdev() Qian Cai
2019-07-08 21:35 ` Christoph Hellwig [this message]
2019-07-09 18:31   ` Qian Cai

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=20190708213515.GB18177@lst.de \
    --to=hch@lst.de \
    --cc=cai@lca.pw \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@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