Commit:     66abe5f257e719547744fdb8691cf5d20603f051
Parent:     7afaac6202782ec28f2039503bdaef666834d60c
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 1 14:41:13 2007 -0700
Committer:  J. Bruce Fields <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 18:32:46 2007 -0400

    9PFS: clean up explicit check for mandatory locks
    The __mandatory_lock(inode) macro makes the same check, but makes the code
    more readable.
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Cc: Eric Van Hensbergen <[EMAIL PROTECTED]>
    Cc: Ron Minnich <[EMAIL PROTECTED]>
    Cc: Latchesar Ionkov <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
 fs/9p/vfs_file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 2a40c29..7166916 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -105,7 +105,7 @@ static int v9fs_file_lock(struct file *filp, int cmd, 
struct file_lock *fl)
        P9_DPRINTK(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl);
        /* No mandatory locks */
-       if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
+       if (__mandatory_lock(inode))
                return -ENOLCK;
        if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) {
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to