]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: Fix per-inode DAX flag inheritance
authorLukas Czerner <lczerner@redhat.com>
Thu, 3 Aug 2017 20:19:13 +0000 (13:19 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 4 Aug 2017 20:43:36 +0000 (13:43 -0700)
commiteaa90c7c29e180d01b2975cb687765140575151e
tree45f1e00147384ae06000eb3e24a5bee542907706
parentbd5ca8c574ccfdd0dab94471236d7c5d8e59ebc2
xfs: Fix per-inode DAX flag inheritance

According to the commit that implemented per-inode DAX flag:
commit 87258a8fd23f ("xfs: introduce per-inode DAX enablement")
the flag is supposed to act as "inherit flag".

Currently this only works in the situations where parent directory
already has a flag in di_flags set, otherwise inheritance does not
work. This is because setting the XFS_DIFLAG2_DAX flag is done in a
wrong branch designated for di_flags, not di_flags2.

Fix this by moving the code to branch designated for setting di_flags2,
which does test for flags in di_flags2.

Fixes: 87258a8fd23f ("xfs: introduce per-inode DAX enablement")
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_inode.c