Unverified Commit 18c61399 authored by Mateusz Guzik's avatar Mateusz Guzik Committed by Christian Brauner
Browse files

xfs: use the new ->i_state accessors



Change generated with coccinelle and fixed up by hand as appropriate.

Signed-off-by: default avatarMateusz Guzik <mjguzik@gmail.com>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent a18d4304
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1249,7 +1249,7 @@ xchk_irele(
		 * hits do not clear DONTCACHE, so we must do it here.
		 */
		spin_lock(&VFS_I(ip)->i_lock);
		VFS_I(ip)->i_state &= ~I_DONTCACHE;
		inode_state_clear(VFS_I(ip), I_DONTCACHE);
		spin_unlock(&VFS_I(ip)->i_lock);
	}

+1 −1
Original line number Diff line number Diff line
@@ -1933,7 +1933,7 @@ xrep_inode_pptr(
	 * Unlinked inodes that cannot be added to the directory tree will not
	 * have a parent pointer.
	 */
	if (inode->i_nlink == 0 && !(inode->i_state & I_LINKABLE))
	if (inode->i_nlink == 0 && !(inode_state_read_once(inode) & I_LINKABLE))
		return 0;

	/* Children of the superblock do not have parent pointers. */
+1 −1
Original line number Diff line number Diff line
@@ -915,7 +915,7 @@ xchk_pptr_looks_zapped(
	 * Temporary files that cannot be linked into the directory tree do not
	 * have attr forks because they cannot ever have parents.
	 */
	if (inode->i_nlink == 0 && !(inode->i_state & I_LINKABLE))
	if (inode->i_nlink == 0 && !(inode_state_read_once(inode) & I_LINKABLE))
		return false;

	/*
+1 −1
Original line number Diff line number Diff line
@@ -514,7 +514,7 @@ xfs_can_free_eofblocks(
	 * Caller must either hold the exclusive io lock; or be inactivating
	 * the inode, which guarantees there are no other users of the inode.
	 */
	if (!(VFS_I(ip)->i_state & I_FREEING))
	if (!(inode_state_read_once(VFS_I(ip)) & I_FREEING))
		xfs_assert_ilocked(ip, XFS_IOLOCK_EXCL);

	/* prealloc/delalloc exists only on regular files */
+2 −2
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ xfs_inode_mark_sick(
	 * is not the case here.
	 */
	spin_lock(&VFS_I(ip)->i_lock);
	VFS_I(ip)->i_state &= ~I_DONTCACHE;
	inode_state_clear(VFS_I(ip), I_DONTCACHE);
	spin_unlock(&VFS_I(ip)->i_lock);
}

@@ -309,7 +309,7 @@ xfs_inode_mark_corrupt(
	 * is not the case here.
	 */
	spin_lock(&VFS_I(ip)->i_lock);
	VFS_I(ip)->i_state &= ~I_DONTCACHE;
	inode_state_clear(VFS_I(ip), I_DONTCACHE);
	spin_unlock(&VFS_I(ip)->i_lock);
}

Loading