Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7afaac6202782ec28f2039503bdaef666834d60c
Commit:     7afaac6202782ec28f2039503bdaef666834d60c
Parent:     a16877ca9cec211708a161057a7cbfbf2cbc3a53
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

    GFS2: clean up explicit check for mandatory locks
    
    The __mandatory_lock(inode) function makes the same check, but makes the 
code
    more readable.
    
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Cc: Steven Whitehouse <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
 fs/gfs2/ops_file.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index 94d76ac..28773ca 100644
--- a/fs/gfs2/ops_file.c
+++ b/fs/gfs2/ops_file.c
@@ -535,7 +535,7 @@ static int gfs2_lock(struct file *file, int cmd, struct 
file_lock *fl)
 
        if (!(fl->fl_flags & FL_POSIX))
                return -ENOLCK;
-       if ((ip->i_inode.i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
+       if (__mandatory_lock(&ip->i_inode))
                return -ENOLCK;
 
        if (sdp->sd_args.ar_localflocks) {
@@ -637,7 +637,7 @@ static int gfs2_flock(struct file *file, int cmd, struct 
file_lock *fl)
 
        if (!(fl->fl_flags & FL_FLOCK))
                return -ENOLCK;
-       if ((ip->i_inode.i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
+       if (__mandatory_lock(&ip->i_inode))
                return -ENOLCK;
 
        if (sdp->sd_args.ar_localflocks)
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to