diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index d1b0da6bcdca..acb978d9d085 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -923,6 +923,30 @@ xfs_set_diflags( | |||
923 | ip->i_d.di_flags = di_flags; | 923 | ip->i_d.di_flags = di_flags; |
924 | } | 924 | } |
925 | 925 | ||
926 | STATIC void | ||
927 | xfs_diflags_to_linux( | ||
928 | struct xfs_inode *ip) | ||
929 | { | ||
930 | struct inode *inode = XFS_ITOV(ip); | ||
931 | unsigned int xflags = xfs_ip2xflags(ip); | ||
932 | |||
933 | if (xflags & XFS_XFLAG_IMMUTABLE) | ||
934 | inode->i_flags |= S_IMMUTABLE; | ||
935 | else | ||
936 | inode->i_flags &= ~S_IMMUTABLE; | ||
937 | if (xflags & XFS_XFLAG_APPEND) | ||
938 | inode->i_flags |= S_APPEND; | ||
939 | else | ||
940 | inode->i_flags &= ~S_APPEND; | ||
941 | if (xflags & XFS_XFLAG_SYNC) | ||
942 | inode->i_flags |= S_SYNC; | ||
943 | else | ||
944 | inode->i_flags &= ~S_SYNC; | ||
945 | if (xflags & XFS_XFLAG_NOATIME) | ||
946 | inode->i_flags |= S_NOATIME; | ||
947 | else | ||
948 | inode->i_flags &= ~S_NOATIME; | ||
949 | } | ||
926 | 950 | ||
927 | #define FSX_PROJID 1 | 951 | #define FSX_PROJID 1 |
928 | #define FSX_EXTSIZE 2 | 952 | #define FSX_EXTSIZE 2 |
@@ -1121,8 +1145,10 @@ xfs_ioctl_setattr( | |||
1121 | 1145 | ||
1122 | if (mask & FSX_EXTSIZE) | 1146 | if (mask & FSX_EXTSIZE) |
1123 | ip->i_d.di_extsize = fa->fsx_extsize >> mp->m_sb.sb_blocklog; | 1147 | ip->i_d.di_extsize = fa->fsx_extsize >> mp->m_sb.sb_blocklog; |
1124 | if (mask & FSX_XFLAGS) | 1148 | if (mask & FSX_XFLAGS) { |
1125 | xfs_set_diflags(ip, fa->fsx_xflags); | 1149 | xfs_set_diflags(ip, fa->fsx_xflags); |
1150 | xfs_diflags_to_linux(ip); | ||
1151 | } | ||
1126 | 1152 | ||
1127 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); | 1153 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); |
1128 | xfs_ichgtime(ip, XFS_ICHGTIME_CHG); | 1154 | xfs_ichgtime(ip, XFS_ICHGTIME_CHG); |
@@ -1160,7 +1186,6 @@ xfs_ioctl_setattr( | |||
1160 | (mask & FSX_NONBLOCK) ? DM_FLAGS_NDELAY : 0); | 1186 | (mask & FSX_NONBLOCK) ? DM_FLAGS_NDELAY : 0); |
1161 | } | 1187 | } |
1162 | 1188 | ||
1163 | vn_revalidate(XFS_ITOV(ip)); /* update flags */ | ||
1164 | return 0; | 1189 | return 0; |
1165 | 1190 | ||
1166 | error_return: | 1191 | error_return: |