From: "Darrick J. Wong" <djwong@kernel.org>
To: Andre Noll <maan@tuebingen.mpg.de>
Cc: Dave Chinner <david@fromorbit.com>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/4] xfs: reactivate XFS_NEED_INACTIVE inodes from xfs_iget
Date: Wed, 20 Mar 2024 07:53:28 -0700 [thread overview]
Message-ID: <20240320145328.GX1927156@frogsfrogsfrogs> (raw)
In-Reply-To: <Zfqg3b3mC8Se7GMU@tuebingen.mpg.de>
On Wed, Mar 20, 2024 at 09:39:57AM +0100, Andre Noll wrote:
> On Tue, Mar 19, 11:16, Dave Chinner wrote
> > + /*
> > + * Well, that sucks. Put the inode back on the inactive queue.
> > + * Do this while still under the ILOCK so that we can set the
> > + * NEED_INACTIVE flag and clear the INACTIVATING flag an not
> > + * have another lookup race with us before we've finished
> > + * putting the inode back on the inodegc queue.
> > + */
> > + spin_unlock(&ip->i_flags_lock);
> > + ip->i_flags |= XFS_NEED_INACTIVE;
> > + ip->i_flags &= ~XFS_INACTIVATING;
> > + spin_unlock(&ip->i_flags_lock);
>
> This doesn't look right. Shouldn't the first spin_unlock() be spin_lock()?
Yes. So much for my hand inspection of code. :(
(Doesn't simple lock debugging catch these sorts of things?)
((It sure would be nice if locking returned a droppable "object" to do
the unlock ala Rust and then spin_lock could be __must_check.))
--D
> Also, there's a typo in the comment (s/an/and).
> Best
> Andre
> --
> Max Planck Institute for Biology
> Tel: (+49) 7071 601 829
> Max-Planck-Ring 5, 72076 Tübingen, Germany
> http://people.tuebingen.mpg.de/maan/
next prev parent reply other threads:[~2024-03-20 14:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 0:15 [PATCH v2 0/4] xfs: recycle inactive inodes immediately Dave Chinner
2024-03-19 0:15 ` [PATCH 1/4] xfs: make inode inactivation state changes atomic Dave Chinner
2024-03-19 18:01 ` Darrick J. Wong
2024-03-19 0:15 ` [PATCH 2/4] xfs: prepare inode for i_gclist detection Dave Chinner
2024-03-19 0:15 ` [PATCH 3/4] xfs: allow lazy removal of inodes from the inodegc queues Dave Chinner
2024-03-19 0:16 ` [PATCH 4/4] xfs: reactivate XFS_NEED_INACTIVE inodes from xfs_iget Dave Chinner
2024-03-19 18:11 ` Darrick J. Wong
2024-03-20 8:39 ` Andre Noll
2024-03-20 14:53 ` Darrick J. Wong [this message]
2024-03-20 16:58 ` Andre Noll
2024-03-20 22:51 ` Dave Chinner
2024-03-21 9:59 ` Andre Noll
2024-03-22 1:09 ` Dave Chinner
2024-03-20 21:58 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2024-02-01 0:30 [RFC] [PATCH 0/4] xfs: reactivate inodes immediately in xfs_iget Dave Chinner
2024-02-01 0:30 ` [PATCH 4/4] xfs: reactivate XFS_NEED_INACTIVE inodes from xfs_iget Dave Chinner
2024-02-01 19:36 ` Darrick J. Wong
2024-02-14 4:00 ` kernel test robot
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=20240320145328.GX1927156@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
--cc=maan@tuebingen.mpg.de \
/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.