xfs: remove pointless unlocked assertion
authorDarrick J. Wong <djwong@kernel.org>
Mon, 22 Apr 2024 16:48:14 +0000 (09:48 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 23 Apr 2024 23:55:14 +0000 (16:55 -0700)
Remove this assertion about the inode not having an attr fork from
xfs_bmap_add_attrfork because the function handles that case just fine.
Weirder still, the function actually /requires/ the caller not to hold
the ILOCK, which means that its accesses are not stabilized.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_bmap.c

index 8a1446e025e07264880328a6a33c8e17ad7a4b38..1f528cf2d9069c74c3aba8abf4233f0e33300d66 100644 (file)
@@ -1041,8 +1041,6 @@ xfs_bmap_add_attrfork(
        int                     logflags;       /* logging flags */
        int                     error;          /* error return value */
 
-       ASSERT(xfs_inode_has_attr_fork(ip) == 0);
-
        mp = ip->i_mount;
        ASSERT(!XFS_NOT_DQATTACHED(mp, ip));