[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a4e6962a0709170751u35944261h3148399c39fdfa8a@mail.gmail.com>
Date: Mon, 17 Sep 2007 09:51:31 -0500
From: "Eric Van Hensbergen" <ericvh@...il.com>
To: "Pavel Emelyanov" <xemul@...nvz.org>
Cc: "Andrew Morton" <akpm@...l.org>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
devel@...nvz.org, "Ron Minnich" <rminnich@...dia.gov>,
"Latchesar Ionkov" <lucho@...kov.net>
Subject: Re: [PATCH 3/5][9PFS] Cleanup explicit check for mandatory locks
On 9/17/07, Pavel Emelyanov <xemul@...nvz.org> wrote:
> The __mandatory_lock(inode) macro makes the same check, but
> makes the code more readable.
>
> Signed-off-by: Pavel Emelyanov <xemul@...nvz.org>
> Acked-by: Eric Van Hensbergen <ericvh@...il.com>
>
> ---
>
> fs/9p/vfs_file.c | 2 +-
> 1 files changed, 1 insertion(+), 1 deletion(-)
>
> 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 *f
> 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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists