lkml.org 
[lkml]   [2006]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/4] locks: don't unnecessarily fail posix lock operations
From
Date
On Fri, 2006-03-31 at 21:25 +0200, Miklos Szeredi wrote:
> > NACK.
> >
> > This changes the behaviour of F_UNLCK. Currently, if the allocation
> > fails, the inode locking state remains unchanged. With your change, an
> > unlock request may end up unlocking part of the inode, but not the rest.
>
> No, look more closer. There are two cases:
>
> - some locks are partially or completely removed
>
> - the unlock splits an existing lock in two.
>
> In the first case no new locks are needed. In the second, no locks
> are modified prior to the check.

Consider something like

fcntl(SETLK, 0, 100)
fcntl(SETLK, 0, 100)
fcntl(SETLK, 0, 100)


-
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-03-31 21:43    [W:0.055 / U:1.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site