Messages in this thread | | | Date | Tue, 03 Jan 2006 14:39:24 -0500 | From | Peter Staubach <> | Subject | Re: [PATCH] fix posix lock on NFS |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |