From: Peter Staubach <staubach@redhat.com>
To: ASANO Masahiro <masano@tnes.nec.co.jp>
Cc: trond.myklebust@fys.uio.no, matthew@wil.cx,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fix posix lock on NFS
Date: Tue, 03 Jan 2006 14:39:24 -0500 [thread overview]
Message-ID: <43BAD2EC.2030807@redhat.com> (raw)
In-Reply-To: <20051222.132454.1025208517.masano@tnes.nec.co.jp>
ASANO Masahiro wrote:
>---
>
>--- linux-2.6.15-rc6/fs/nfs/file.c.orig 2005-12-21 21:30:14.000000000 +0900
>+++ linux-2.6.15-rc6/fs/nfs/file.c 2005-12-21 21:42:16.000000000 +0900
>@@ -524,7 +524,8 @@ static int nfs_lock(struct file *filp, i
> 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))
>
Just out of curiosity, what is this if() statement intended to protect?
For locking purposes, why would the client care if the file has the
mandatory lock bits set?
Thanx...
ps
next prev parent reply other threads:[~2006-01-03 19:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-22 4:24 [PATCH] fix posix lock on NFS ASANO Masahiro
2006-01-03 19:39 ` Peter Staubach [this message]
2006-01-03 19:46 ` Matthew Wilcox
2006-01-03 20:09 ` Peter Staubach
2006-01-04 1:24 ` Trond Myklebust
2006-01-04 14:16 ` Peter Staubach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43BAD2EC.2030807@redhat.com \
--to=staubach@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masano@tnes.nec.co.jp \
--cc=matthew@wil.cx \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).