]> err.no Git - linux-2.6/blobdiff - fs/nfs/file.c
Merge http://oss.oracle.com/git/ocfs2
[linux-2.6] / fs / nfs / file.c
index eb5cd4c3bbfdbf3aae12b0f367f544fcc4c4a13b..7a79fbe9f5394c67dd53b01526d37e29fae0ce4e 100644 (file)
@@ -509,7 +509,8 @@ static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl)
                return -EINVAL;
 
        /* No mandatory locks over NFS */
-       if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
+       if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID &&
+           fl->fl_type != F_UNLCK)
                return -ENOLCK;
 
        if (IS_GETLK(cmd))