aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index 69809eef8a54..df17d93bd096 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -777,6 +777,8 @@ xfs_ioctl(
case XFS_IOC_GETVERSION:
case XFS_IOC_GETXFLAGS:
case XFS_IOC_SETXFLAGS:
+ case XFS_IOC_GETPROJID:
+ case XFS_IOC_SETPROJID:
case XFS_IOC_FSGETXATTR:
case XFS_IOC_FSSETXATTR:
case XFS_IOC_FSGETXATTRA:
@@ -1258,6 +1260,26 @@ xfs_ioc_xattr(
return 0;
}
+ case XFS_IOC_GETPROJID: {
+ va.va_mask = XFS_AT_PROJID;
+ VOP_GETATTR(vp, &va, 0, NULL, error);
+ if (error)
+ return -error;
+ if (copy_to_user(arg, &va.va_projid, sizeof(va.va_projid)))
+ return -XFS_ERROR(EFAULT);
+ return 0;
+ }
+
+ case XFS_IOC_SETPROJID: {
+ if (!capable(CAP_SYS_ADMIN))
+ return -EPERM;
+ va.va_mask = XFS_AT_PROJID;
+ if (copy_from_user(&va.va_projid, arg, sizeof(va.va_projid)))
+ return -XFS_ERROR(EFAULT);
+ VOP_SETATTR(vp, &va, 0, NULL, error);
+ return -error;
+ }
+
default:
return -ENOTTY;
}