Whamcloud - gitweb
LU-5817 clio: Do not allow group locks with gid 0
[fs/lustre-release.git] / lustre / llite / file.c
index 655ac1a..612312c 100644 (file)
@@ -1639,6 +1639,11 @@ ll_get_grouplock(struct inode *inode, struct file *file, unsigned long arg)
         int                     rc;
         ENTRY;
 
+       if (arg == 0) {
+               CWARN("group id for group lock must not be 0\n");
+               RETURN(-EINVAL);
+       }
+
         if (ll_file_nolock(file))
                 RETURN(-EOPNOTSUPP);