Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932109AbWCaTkr (ORCPT ); Fri, 31 Mar 2006 14:40:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932152AbWCaTkr (ORCPT ); Fri, 31 Mar 2006 14:40:47 -0500 Received: from pat.uio.no ([129.240.10.6]:11156 "EHLO pat.uio.no") by vger.kernel.org with ESMTP id S932109AbWCaTkp (ORCPT ); Fri, 31 Mar 2006 14:40:45 -0500 Subject: Re: [PATCH 2/4] locks: don't unnecessarily fail posix lock operations From: Trond Myklebust To: Miklos Szeredi Cc: akpm@osdl.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: <1143829641.8085.7.camel@lade.trondhjem.org> Content-Type: text/plain Date: Fri, 31 Mar 2006 14:40:22 -0500 Message-Id: <1143834022.8116.1.camel@lade.trondhjem.org> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-UiO-Spam-info: not spam, SpamAssassin (score=-3.297, required 12, autolearn=disabled, AWL 1.52, FORGED_RCVD_HELO 0.05, RCVD_IN_SORBS_DUL 0.14, UIO_MAIL_IS_INTERNAL -5.00) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 896 Lines: 28 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/