diff options
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r-- | fs/nfs/file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index c664bb921425..08c7c7387fce 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -577,8 +577,7 @@ static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl) | |||
577 | nfs_inc_stats(inode, NFSIOS_VFSLOCK); | 577 | nfs_inc_stats(inode, NFSIOS_VFSLOCK); |
578 | 578 | ||
579 | /* No mandatory locks over NFS */ | 579 | /* No mandatory locks over NFS */ |
580 | if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID && | 580 | if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) |
581 | fl->fl_type != F_UNLCK) | ||
582 | return -ENOLCK; | 581 | return -ENOLCK; |
583 | 582 | ||
584 | if (IS_GETLK(cmd)) | 583 | if (IS_GETLK(cmd)) |