aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_inode.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index ceef77c0416a..ff48f0096810 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -874,7 +874,6 @@ xfs_ialloc(
874 case S_IFREG: 874 case S_IFREG:
875 case S_IFDIR: 875 case S_IFDIR:
876 if (pip && (pip->i_d.di_flags & XFS_DIFLAG_ANY)) { 876 if (pip && (pip->i_d.di_flags & XFS_DIFLAG_ANY)) {
877 uint64_t di_flags2 = 0;
878 uint di_flags = 0; 877 uint di_flags = 0;
879 878
880 if (S_ISDIR(mode)) { 879 if (S_ISDIR(mode)) {
@@ -911,20 +910,23 @@ xfs_ialloc(
911 di_flags |= XFS_DIFLAG_NODEFRAG; 910 di_flags |= XFS_DIFLAG_NODEFRAG;
912 if (pip->i_d.di_flags & XFS_DIFLAG_FILESTREAM) 911 if (pip->i_d.di_flags & XFS_DIFLAG_FILESTREAM)
913 di_flags |= XFS_DIFLAG_FILESTREAM; 912 di_flags |= XFS_DIFLAG_FILESTREAM;
914 if (pip->i_d.di_flags2 & XFS_DIFLAG2_DAX)
915 di_flags2 |= XFS_DIFLAG2_DAX;
916 913
917 ip->i_d.di_flags |= di_flags; 914 ip->i_d.di_flags |= di_flags;
918 ip->i_d.di_flags2 |= di_flags2;
919 } 915 }
920 if (pip && 916 if (pip &&
921 (pip->i_d.di_flags2 & XFS_DIFLAG2_ANY) && 917 (pip->i_d.di_flags2 & XFS_DIFLAG2_ANY) &&
922 pip->i_d.di_version == 3 && 918 pip->i_d.di_version == 3 &&
923 ip->i_d.di_version == 3) { 919 ip->i_d.di_version == 3) {
920 uint64_t di_flags2 = 0;
921
924 if (pip->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE) { 922 if (pip->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE) {
925 ip->i_d.di_flags2 |= XFS_DIFLAG2_COWEXTSIZE; 923 di_flags2 |= XFS_DIFLAG2_COWEXTSIZE;
926 ip->i_d.di_cowextsize = pip->i_d.di_cowextsize; 924 ip->i_d.di_cowextsize = pip->i_d.di_cowextsize;
927 } 925 }
926 if (pip->i_d.di_flags2 & XFS_DIFLAG2_DAX)
927 di_flags2 |= XFS_DIFLAG2_DAX;
928
929 ip->i_d.di_flags2 |= di_flags2;
928 } 930 }
929 /* FALLTHROUGH */ 931 /* FALLTHROUGH */
930 case S_IFLNK: 932 case S_IFLNK: