From deee24f76da2513517fd3877cd809c9b707ef511 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 22 Dec 2005 09:33:04 -0800 Subject: [PATCH] --- yaml --- r: 15287 b: refs/heads/master c: fbbde0c30943306ddb77d969df6be68ebc6dc265 h: refs/heads/master i: 15285: 9eea9dfa6c9edd132afa8c6f3283a135ea5cb765 15283: c5428f25da1bfa769a43652e0b72991608979643 15279: 3c606b830f36b5ee34a7d26a90a7638623c70c0f v: v3 --- [refs] | 2 +- trunk/fs/nfs/file.c | 3 ++- trunk/include/linux/preempt.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index edf894d9da07..f2cad966b61c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 515432aa7ae75ea493099f38adc14a99436fa1ac +refs/heads/master: fbbde0c30943306ddb77d969df6be68ebc6dc265 diff --git a/trunk/fs/nfs/file.c b/trunk/fs/nfs/file.c index eb5cd4c3bbfd..7a79fbe9f539 100644 --- a/trunk/fs/nfs/file.c +++ b/trunk/fs/nfs/file.c @@ -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)) diff --git a/trunk/include/linux/preempt.h b/trunk/include/linux/preempt.h index d9a2f5254a51..5769d14d1e6a 100644 --- a/trunk/include/linux/preempt.h +++ b/trunk/include/linux/preempt.h @@ -48,6 +48,7 @@ do { \ #define preempt_enable() \ do { \ preempt_enable_no_resched(); \ + barrier(); \ preempt_check_resched(); \ } while (0)