public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qian Cai <cai@lca.pw>
To: Christoph Hellwig <hch@lst.de>
Cc: 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: Tue, 09 Jul 2019 14:31:21 -0400	[thread overview]
Message-ID: <1562697081.8510.16.camel@lca.pw> (raw)
In-Reply-To: <20190708213515.GB18177@lst.de>

On Mon, 2019-07-08 at 23:35 +0200, Christoph Hellwig wrote:
> 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);
>  		}

Yes, it works fine.

      reply	other threads:[~2019-07-09 18:31 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
2019-07-09 18:31   ` Qian Cai [this message]

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=1562697081.8510.16.camel@lca.pw \
    --to=cai@lca.pw \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hch@lst.de \
    --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