Skip to content

Commit 1090427

Browse files
Christoph HellwigDarrick J. Wong
authored andcommitted
xfs: remove xfs_inew_wait
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: 777eb1f ("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>
1 parent a1de97f commit 1090427

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

fs/xfs/xfs_icache.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -289,22 +289,6 @@ xfs_perag_clear_inode_tag(
289289
trace_xfs_perag_clear_inode_tag(mp, pag->pag_agno, tag, _RET_IP_);
290290
}
291291

292-
static inline void
293-
xfs_inew_wait(
294-
struct xfs_inode *ip)
295-
{
296-
wait_queue_head_t *wq = bit_waitqueue(&ip->i_flags, __XFS_INEW_BIT);
297-
DEFINE_WAIT_BIT(wait, &ip->i_flags, __XFS_INEW_BIT);
298-
299-
do {
300-
prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
301-
if (!xfs_iflags_test(ip, XFS_INEW))
302-
break;
303-
schedule();
304-
} while (true);
305-
finish_wait(wq, &wait.wq_entry);
306-
}
307-
308292
/*
309293
* When we recycle a reclaimable inode, we need to re-initialise the VFS inode
310294
* part of the structure. This is made more complex by the fact we store
@@ -368,18 +352,13 @@ xfs_iget_recycle(
368352
ASSERT(!rwsem_is_locked(&inode->i_rwsem));
369353
error = xfs_reinit_inode(mp, inode);
370354
if (error) {
371-
bool wake;
372-
373355
/*
374356
* Re-initializing the inode failed, and we are in deep
375357
* trouble. Try to re-add it to the reclaim list.
376358
*/
377359
rcu_read_lock();
378360
spin_lock(&ip->i_flags_lock);
379-
wake = !!__xfs_iflags_test(ip, XFS_INEW);
380361
ip->i_flags &= ~(XFS_INEW | XFS_IRECLAIM);
381-
if (wake)
382-
wake_up_bit(&ip->i_flags, __XFS_INEW_BIT);
383362
ASSERT(ip->i_flags & XFS_IRECLAIMABLE);
384363
spin_unlock(&ip->i_flags_lock);
385364
rcu_read_unlock();

fs/xfs/xfs_inode.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,7 @@ static inline bool xfs_inode_has_bigtime(struct xfs_inode *ip)
231231
#define XFS_IRECLAIM (1 << 0) /* started reclaiming this inode */
232232
#define XFS_ISTALE (1 << 1) /* inode has been staled */
233233
#define XFS_IRECLAIMABLE (1 << 2) /* inode can be reclaimed */
234-
#define __XFS_INEW_BIT 3 /* inode has just been allocated */
235-
#define XFS_INEW (1 << __XFS_INEW_BIT)
234+
#define XFS_INEW (1 << 3) /* inode has just been allocated */
236235
#define XFS_IPRESERVE_DM_FIELDS (1 << 4) /* has legacy DMAPI fields set */
237236
#define XFS_ITRUNCATED (1 << 5) /* truncated down so flush-on-close */
238237
#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)
492491
xfs_iflags_clear(ip, XFS_INEW);
493492
barrier();
494493
unlock_new_inode(VFS_I(ip));
495-
wake_up_bit(&ip->i_flags, __XFS_INEW_BIT);
496494
}
497495

498496
static inline void xfs_setup_existing_inode(struct xfs_inode *ip)

0 commit comments

Comments
 (0)