The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Viacheslav Dubeyko <vdubeyko@redhat.com>
To: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: Shuangpeng Bai <shuangpeng.kernel@gmail.com>,
	Viacheslav Dubeyko <slava@dubeyko.com>,
	Christian Brauner <brauner@kernel.org>,
	 linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nilfs2: fix backing_dev_info reference leak
Date: Fri, 08 May 2026 11:08:38 -0700	[thread overview]
Message-ID: <cd793972d323b63f90b486512e220fe2a21b1946.camel@redhat.com> (raw)
In-Reply-To: <CAKFNMo=57tDvSecrxGETJYLr2JNZAZ5HYSJqNwFV5dywJ7L5ng@mail.gmail.com>

On Fri, 2026-05-08 at 11:05 +0900, Ryusuke Konishi wrote:
> On Fri, May 8, 2026 at 6:41 AM Viacheslav Dubeyko wrote:
> > 
> > On Thu, 2026-05-07 at 11:50 -0400, Shuangpeng Bai wrote:
> > > setup_bdev_super() already initializes sb->s_bdev and takes a
> > > reference on the block device backing_dev_info when assigning sb->s_bdi.
> > > 
> > > nilfs_fill_super() takes another reference to the same
> > > backing_dev_info and stores it in sb->s_bdi again. The extra
> > > reference is not paired with a matching bdi_put(), since
> > > generic_shutdown_super() releases sb->s_bdi only once.
> > > 
> > > Drop the redundant bdi_get() in nilfs_fill_super(). The single
> > > reference taken by setup_bdev_super() is enough and is released
> > > during superblock shutdown.
> > > 
> > > Fixes: c1e012ea9e83 ("nilfs2: use setup_bdev_super to de-duplicate the mount code")
> > > Signed-off-by: Shuangpeng Bai <shuangpeng.kernel@gmail.com>
> > > ---
> > >  fs/nilfs2/super.c | 2 --
> > >  1 file changed, 2 deletions(-)
> 
> Acked-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
> 
> Viacheslav,
> 
> Could you please apply this directly?
> I have also verified the fix and confirmed that the Fixes tag
> correctly identifies the origin of the leak for backporting.
> 

Applied.

Thanks,
Slava.


      reply	other threads:[~2026-05-08 18:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07 15:50 [PATCH] nilfs2: fix backing_dev_info reference leak Shuangpeng Bai
2026-05-07 21:41 ` Viacheslav Dubeyko
2026-05-08  2:05   ` Ryusuke Konishi
2026-05-08 18:08     ` Viacheslav Dubeyko [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=cd793972d323b63f90b486512e220fe2a21b1946.camel@redhat.com \
    --to=vdubeyko@redhat.com \
    --cc=brauner@kernel.org \
    --cc=konishi.ryusuke@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nilfs@vger.kernel.org \
    --cc=shuangpeng.kernel@gmail.com \
    --cc=slava@dubeyko.com \
    /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