All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leah Rumancik <leah.rumancik@gmail.com>
To: linux-xfs@vger.kernel.org, djwong@kernel.org
Cc: Christoph Hellwig <hch@lst.de>, kernel test robot <lkp@intel.com>,
	Brian Foster <bfoster@redhat.com>,
	Leah Rumancik <leah.rumancik@gmail.com>
Subject: [PATCH 5.15 04/15] xfs: remove xfs_inew_wait
Date: Fri,  3 Jun 2022 11:57:10 -0700	[thread overview]
Message-ID: <20220603185721.3121645-4-leah.rumancik@gmail.com> (raw)
In-Reply-To: <20220603185721.3121645-1-leah.rumancik@gmail.com>

From: Christoph Hellwig <hch@lst.de>

[ Upstream commit 1090427bf18f9835b3ccbd36edf43f2509444e27 ]

With the remove of xfs_dqrele_all_inodes, xfs_inew_wait and all the
infrastructure used to wake the XFS_INEW bit waitqueue is unused.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 777eb1fa857e ("xfs: remove xfs_dqrele_all_inodes")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com>
---
 fs/xfs/xfs_icache.c | 21 ---------------------
 fs/xfs/xfs_inode.h  |  4 +---
 2 files changed, 1 insertion(+), 24 deletions(-)

diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index f2210d927481..5f397762a3b8 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -289,22 +289,6 @@ xfs_perag_clear_inode_tag(
 	trace_xfs_perag_clear_inode_tag(mp, pag->pag_agno, tag, _RET_IP_);
 }
 
-static inline void
-xfs_inew_wait(
-	struct xfs_inode	*ip)
-{
-	wait_queue_head_t *wq = bit_waitqueue(&ip->i_flags, __XFS_INEW_BIT);
-	DEFINE_WAIT_BIT(wait, &ip->i_flags, __XFS_INEW_BIT);
-
-	do {
-		prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
-		if (!xfs_iflags_test(ip, XFS_INEW))
-			break;
-		schedule();
-	} while (true);
-	finish_wait(wq, &wait.wq_entry);
-}
-
 /*
  * When we recycle a reclaimable inode, we need to re-initialise the VFS inode
  * part of the structure. This is made more complex by the fact we store
@@ -368,18 +352,13 @@ xfs_iget_recycle(
 	ASSERT(!rwsem_is_locked(&inode->i_rwsem));
 	error = xfs_reinit_inode(mp, inode);
 	if (error) {
-		bool	wake;
-
 		/*
 		 * Re-initializing the inode failed, and we are in deep
 		 * trouble.  Try to re-add it to the reclaim list.
 		 */
 		rcu_read_lock();
 		spin_lock(&ip->i_flags_lock);
-		wake = !!__xfs_iflags_test(ip, XFS_INEW);
 		ip->i_flags &= ~(XFS_INEW | XFS_IRECLAIM);
-		if (wake)
-			wake_up_bit(&ip->i_flags, __XFS_INEW_BIT);
 		ASSERT(ip->i_flags & XFS_IRECLAIMABLE);
 		spin_unlock(&ip->i_flags_lock);
 		rcu_read_unlock();
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index b21b177832d1..2303d035f7d5 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -231,8 +231,7 @@ static inline bool xfs_inode_has_bigtime(struct xfs_inode *ip)
 #define XFS_IRECLAIM		(1 << 0) /* started reclaiming this inode */
 #define XFS_ISTALE		(1 << 1) /* inode has been staled */
 #define XFS_IRECLAIMABLE	(1 << 2) /* inode can be reclaimed */
-#define __XFS_INEW_BIT		3	 /* inode has just been allocated */
-#define XFS_INEW		(1 << __XFS_INEW_BIT)
+#define XFS_INEW		(1 << 3) /* inode has just been allocated */
 #define XFS_IPRESERVE_DM_FIELDS	(1 << 4) /* has legacy DMAPI fields set */
 #define XFS_ITRUNCATED		(1 << 5) /* truncated down so flush-on-close */
 #define XFS_IDIRTY_RELEASE	(1 << 6) /* dirty release already seen */
@@ -492,7 +491,6 @@ static inline void xfs_finish_inode_setup(struct xfs_inode *ip)
 	xfs_iflags_clear(ip, XFS_INEW);
 	barrier();
 	unlock_new_inode(VFS_I(ip));
-	wake_up_bit(&ip->i_flags, __XFS_INEW_BIT);
 }
 
 static inline void xfs_setup_existing_inode(struct xfs_inode *ip)
-- 
2.36.1.255.ge46751e96f-goog


  parent reply	other threads:[~2022-06-03 18:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03 18:57 [PATCH 5.15 01/15] xfs: use kmem_cache_free() for kmem_cache objects Leah Rumancik
2022-06-03 18:57 ` [PATCH 5.15 02/15] xfs: punch out data fork delalloc blocks on COW writeback failure Leah Rumancik
2022-06-03 18:57 ` [PATCH 5.15 03/15] xfs: Fix the free logic of state in xfs_attr_node_hasname Leah Rumancik
2022-06-03 18:57 ` Leah Rumancik [this message]
2022-06-03 18:57 ` [PATCH 5.15 05/15] xfs: remove all COW fork extents when remounting readonly Leah Rumancik
2022-06-03 18:57 ` [PATCH 5.15 06/15] xfs: only run COW extent recovery when there are no live extents Leah Rumancik
2022-06-03 18:57 ` [PATCH 5.15 07/15] xfs: check sb_meta_uuid for dabuf buffer recovery Leah Rumancik
2022-06-03 18:57 ` [PATCH 5.15 08/15] xfs: prevent UAF in xfs_log_item_in_current_chkpt Leah Rumancik
2022-06-03 18:57 ` [PATCH 5.15 09/15] xfs: only bother with sync_filesystem during readonly remount Leah Rumancik
2022-06-03 18:57 ` [PATCH 5.15 10/15] xfs: don't generate selinux audit messages for capability testing Leah Rumancik
2022-06-03 18:57 ` [PATCH 5.15 11/15] xfs: use setattr_copy to set vfs inode attributes Leah Rumancik
2022-06-03 18:57 ` [PATCH 5.15 12/15] xfs: async CIL flushes need pending pushes to be made stable Leah Rumancik
2022-06-08  7:43   ` Amir Goldstein
2022-06-13 17:31     ` Leah Rumancik
2022-06-03 18:57 ` [PATCH 5.15 13/15] xfs: don't include bnobt blocks when reserving free block pool Leah Rumancik
2022-06-03 18:57 ` [PATCH 5.15 14/15] xfs: run callbacks before waking waiters in xlog_state_shutdown_callbacks Leah Rumancik
2022-06-03 18:57 ` [PATCH 5.15 15/15] xfs: drop async cache flushes from CIL commits Leah Rumancik

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=20220603185721.3121645-4-leah.rumancik@gmail.com \
    --to=leah.rumancik@gmail.com \
    --cc=bfoster@redhat.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    --cc=lkp@intel.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 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.