linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruenba@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jan Kara <jack@suse.cz>,
	cgroups@vger.kernel.org,
	 Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Rafael Aquini <aquini@redhat.com>,
	 gfs2@lists.linux.dev, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [RFC 2/2] writeback: Fix false warning in inode_to_wb()
Date: Thu, 10 Apr 2025 19:48:14 +0200	[thread overview]
Message-ID: <CAHc6FU6NHxG-Tn+5tn2zy3QJFVruOM6tG7DsDi1sF+vDw4Xr_g@mail.gmail.com> (raw)
In-Reply-To: <Z_eGvBHssVtGKpty@infradead.org>

On Thu, Apr 10, 2025 at 10:52 AM Christoph Hellwig <hch@infradead.org> wrote:
> On Mon, Apr 07, 2025 at 08:21:02PM +0200, Andreas Gruenbacher wrote:
> > -static inline struct bdi_writeback *inode_to_wb(const struct inode *inode)
> > +static inline struct bdi_writeback *inode_to_wb(struct inode *inode)
> >  {
> >  #ifdef CONFIG_LOCKDEP
> >       WARN_ON_ONCE(debug_locks &&
> > +                  inode_cgwb_enabled(inode) &&
> >                    (!lockdep_is_held(&inode->i_lock) &&
> >                     !lockdep_is_held(&inode->i_mapping->i_pages.xa_lock) &&
> >                     !lockdep_is_held(&inode->i_wb->list_lock)));
> > --
>
> This means that even on cgroup aware file systems we now only get
> the locking validation if cgroups are actually enabled for the file
> system instance and thus hugely reducing coverage, which is rather
> unfortunate.

Right. Is checking for (inode->i_sb->s_iflags & SB_I_CGROUPWB) instead okay?

Thanks,
Andreas



      reply	other threads:[~2025-04-10 17:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 18:21 [RFC 0/2] Fix false warning in inode_to_wb Andreas Gruenbacher
2025-04-07 18:21 ` [RFC 1/2] gfs2: replace sd_aspace with sd_inode Andreas Gruenbacher
     [not found]   ` <77b1b228-3799-43e3-ab30-5aec1d633816@I-love.SAKURA.ne.jp>
2025-04-08 11:19     ` Andreas Gruenbacher
2025-04-10  8:50   ` Christoph Hellwig
2025-04-10 19:20     ` Andreas Gruenbacher
2025-04-07 18:21 ` [RFC 2/2] writeback: Fix false warning in inode_to_wb() Andreas Gruenbacher
2025-04-10  8:52   ` Christoph Hellwig
2025-04-10 17:48     ` Andreas Gruenbacher [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=CAHc6FU6NHxG-Tn+5tn2zy3QJFVruOM6tG7DsDi1sF+vDw4Xr_g@mail.gmail.com \
    --to=agruenba@redhat.com \
    --cc=aquini@redhat.com \
    --cc=cgroups@vger.kernel.org \
    --cc=gfs2@lists.linux.dev \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    /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