Group locks are created/freed via dedicated ioctls. Disallow manually
setting or clearing the flag.
HPE-bug-id: LUS-12078
Signed-off-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Signed-off-by: Matt Ezell <ezellma@ornl.gov>
Change-Id: Id5022cc02a7bdce2f0150592470e8336b4537a61
Reviewed-on: https://es-gerrit.hpc.amslabs.hpecorp.net/162708
Reviewed-by: Andriy Skulysh <andriy.skulysh@hpe.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Tested-by: Alexander Lezhoev <alexander.lezhoev@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53782
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
if (get_user(flags, (int __user *)arg))
RETURN(-EFAULT);
+ /* LL_FILE_GROUP_LOCKED is managed via its own ioctls */
+ if (flags & LL_FILE_GROUP_LOCKED)
+ RETURN(-EINVAL);
+
if (cmd == LL_IOC_SETFLAGS) {
if ((flags & LL_FILE_IGNORE_LOCK) &&
!(file->f_flags & O_DIRECT)) {