Commit f38a032b authored by Dave Chinner's avatar Dave Chinner Committed by Darrick J. Wong
Browse files

xfs: fix I_DONTCACHE



Yup, the VFS hoist broke it, and nobody noticed. Bulkstat workloads
make it clear that it doesn't work as it should.

Fixes: dae2f8ed ("fs: Lift XFS_IDONTCACHE to the VFS layer")
Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
parent 72a048c1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -84,8 +84,9 @@ xfs_inode_alloc(
		return NULL;
	}

	/* VFS doesn't initialise i_mode! */
	/* VFS doesn't initialise i_mode or i_state! */
	VFS_I(ip)->i_mode = 0;
	VFS_I(ip)->i_state = 0;

	XFS_STATS_INC(mp, vn_active);
	ASSERT(atomic_read(&ip->i_pincount) == 0);
+1 −1
Original line number Diff line number Diff line
@@ -1344,7 +1344,7 @@ xfs_setup_inode(
	gfp_t			gfp_mask;

	inode->i_ino = ip->i_ino;
	inode->i_state = I_NEW;
	inode->i_state |= I_NEW;

	inode_sb_list_add(inode);
	/* make the inode look hashed for the writeback code */