Commit 6dfe5a049f2 (xfs: xfs_attr_inactive leaves inconsistent attr fork state behind) fixed an issue where an inconsistent attr fork count persisted on disk if there was concurrent inode writeback happening after the inode was evicted from the VFS layer. If one of those inodes landed on disk and was reused, it may have an invalid di_forkoff, which can cause problems when trying to add new extended attributes. Since we clear the rest of the attribute fork values on ialloc, let's clear di_forkoff as well and ensure the invalid value won't be encountered. Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx> --- fs/xfs/xfs_inode.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -835,6 +835,7 @@ xfs_ialloc( */ ip->i_d.di_aformat = XFS_DINODE_FMT_EXTENTS; ip->i_d.di_anextents = 0; + ip->i_d.di_forkoff = 0; /* * Log the new values stuffed into the inode. -- Jeff Mahoney SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html