Skip to content

Commit

Permalink
xfs: preserve DIFLAG2_NREXT64 when setting other inode attributes
Browse files Browse the repository at this point in the history
It is vitally important that we preserve the state of the NREXT64 inode
flag when we're changing the other flags2 fields.

Fixes: 9b7d16e ("xfs: Introduce XFS_DIFLAG2_NREXT64 and associated helpers")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
  • Loading branch information
Darrick J. Wong committed Jun 16, 2022
1 parent 10930b2 commit e89ab76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/xfs/xfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,8 @@ xfs_flags2diflags2(
{
uint64_t di_flags2 =
(ip->i_diflags2 & (XFS_DIFLAG2_REFLINK |
XFS_DIFLAG2_BIGTIME));
XFS_DIFLAG2_BIGTIME |
XFS_DIFLAG2_NREXT64));

if (xflags & FS_XFLAG_DAX)
di_flags2 |= XFS_DIFLAG2_DAX;
Expand Down

0 comments on commit e89ab76

Please sign in to comment.