diff options
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 59b5c9b21ed7..e9d920d4a659 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -1090,11 +1090,6 @@ xfs_ioc_fsgeometry( | |||
1090 | /* | 1090 | /* |
1091 | * Linux extended inode flags interface. | 1091 | * Linux extended inode flags interface. |
1092 | */ | 1092 | */ |
1093 | #define LINUX_XFLAG_SYNC 0x00000008 /* Synchronous updates */ | ||
1094 | #define LINUX_XFLAG_IMMUTABLE 0x00000010 /* Immutable file */ | ||
1095 | #define LINUX_XFLAG_APPEND 0x00000020 /* writes to file may only append */ | ||
1096 | #define LINUX_XFLAG_NODUMP 0x00000040 /* do not dump file */ | ||
1097 | #define LINUX_XFLAG_NOATIME 0x00000080 /* do not update atime */ | ||
1098 | 1093 | ||
1099 | STATIC unsigned int | 1094 | STATIC unsigned int |
1100 | xfs_merge_ioc_xflags( | 1095 | xfs_merge_ioc_xflags( |
@@ -1103,23 +1098,23 @@ xfs_merge_ioc_xflags( | |||
1103 | { | 1098 | { |
1104 | unsigned int xflags = start; | 1099 | unsigned int xflags = start; |
1105 | 1100 | ||
1106 | if (flags & LINUX_XFLAG_IMMUTABLE) | 1101 | if (flags & FS_IMMUTABLE_FL) |
1107 | xflags |= XFS_XFLAG_IMMUTABLE; | 1102 | xflags |= XFS_XFLAG_IMMUTABLE; |
1108 | else | 1103 | else |
1109 | xflags &= ~XFS_XFLAG_IMMUTABLE; | 1104 | xflags &= ~XFS_XFLAG_IMMUTABLE; |
1110 | if (flags & LINUX_XFLAG_APPEND) | 1105 | if (flags & FS_APPEND_FL) |
1111 | xflags |= XFS_XFLAG_APPEND; | 1106 | xflags |= XFS_XFLAG_APPEND; |
1112 | else | 1107 | else |
1113 | xflags &= ~XFS_XFLAG_APPEND; | 1108 | xflags &= ~XFS_XFLAG_APPEND; |
1114 | if (flags & LINUX_XFLAG_SYNC) | 1109 | if (flags & FS_SYNC_FL) |
1115 | xflags |= XFS_XFLAG_SYNC; | 1110 | xflags |= XFS_XFLAG_SYNC; |
1116 | else | 1111 | else |
1117 | xflags &= ~XFS_XFLAG_SYNC; | 1112 | xflags &= ~XFS_XFLAG_SYNC; |
1118 | if (flags & LINUX_XFLAG_NOATIME) | 1113 | if (flags & FS_NOATIME_FL) |
1119 | xflags |= XFS_XFLAG_NOATIME; | 1114 | xflags |= XFS_XFLAG_NOATIME; |
1120 | else | 1115 | else |
1121 | xflags &= ~XFS_XFLAG_NOATIME; | 1116 | xflags &= ~XFS_XFLAG_NOATIME; |
1122 | if (flags & LINUX_XFLAG_NODUMP) | 1117 | if (flags & FS_NODUMP_FL) |
1123 | xflags |= XFS_XFLAG_NODUMP; | 1118 | xflags |= XFS_XFLAG_NODUMP; |
1124 | else | 1119 | else |
1125 | xflags &= ~XFS_XFLAG_NODUMP; | 1120 | xflags &= ~XFS_XFLAG_NODUMP; |
@@ -1134,15 +1129,15 @@ xfs_di2lxflags( | |||
1134 | unsigned int flags = 0; | 1129 | unsigned int flags = 0; |
1135 | 1130 | ||
1136 | if (di_flags & XFS_DIFLAG_IMMUTABLE) | 1131 | if (di_flags & XFS_DIFLAG_IMMUTABLE) |
1137 | flags |= LINUX_XFLAG_IMMUTABLE; | 1132 | flags |= FS_IMMUTABLE_FL; |
1138 | if (di_flags & XFS_DIFLAG_APPEND) | 1133 | if (di_flags & XFS_DIFLAG_APPEND) |
1139 | flags |= LINUX_XFLAG_APPEND; | 1134 | flags |= FS_APPEND_FL; |
1140 | if (di_flags & XFS_DIFLAG_SYNC) | 1135 | if (di_flags & XFS_DIFLAG_SYNC) |
1141 | flags |= LINUX_XFLAG_SYNC; | 1136 | flags |= FS_SYNC_FL; |
1142 | if (di_flags & XFS_DIFLAG_NOATIME) | 1137 | if (di_flags & XFS_DIFLAG_NOATIME) |
1143 | flags |= LINUX_XFLAG_NOATIME; | 1138 | flags |= FS_NOATIME_FL; |
1144 | if (di_flags & XFS_DIFLAG_NODUMP) | 1139 | if (di_flags & XFS_DIFLAG_NODUMP) |
1145 | flags |= LINUX_XFLAG_NODUMP; | 1140 | flags |= FS_NODUMP_FL; |
1146 | return flags; | 1141 | return flags; |
1147 | } | 1142 | } |
1148 | 1143 | ||
@@ -1242,9 +1237,9 @@ xfs_ioc_xattr( | |||
1242 | break; | 1237 | break; |
1243 | } | 1238 | } |
1244 | 1239 | ||
1245 | if (flags & ~(LINUX_XFLAG_IMMUTABLE | LINUX_XFLAG_APPEND | \ | 1240 | if (flags & ~(FS_IMMUTABLE_FL | FS_APPEND_FL | \ |
1246 | LINUX_XFLAG_NOATIME | LINUX_XFLAG_NODUMP | \ | 1241 | FS_NOATIME_FL | FS_NODUMP_FL | \ |
1247 | LINUX_XFLAG_SYNC)) { | 1242 | FS_SYNC_FL)) { |
1248 | error = -EOPNOTSUPP; | 1243 | error = -EOPNOTSUPP; |
1249 | break; | 1244 | break; |
1250 | } | 1245 | } |