lkml.org 
[lkml]   [2006]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2006-01-03 20:41    [W:0.051 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site