From: Andrew Morton Subject: Re: i_mutex locking in generic_file_splice_write() Date: Fri, 13 Oct 2006 01:11:29 -0700 Message-ID: <20061013011129.42a757fb.akpm@osdl.org> References: <20061012190152.GU6485@ca-server1.us.oracle.com> <20061012125409.40bd1fb1.akpm@osdl.org> <20061013001715.GV6485@ca-server1.us.oracle.com> <20061013074516.GY6515@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Mark Fasheh , linux-fsdevel@vger.kernel.org, Michael Halcrow Return-path: Received: from smtp.osdl.org ([65.172.181.4]:22436 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1750709AbWJMIMh (ORCPT ); Fri, 13 Oct 2006 04:12:37 -0400 To: Jens Axboe In-Reply-To: <20061013074516.GY6515@kernel.dk> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, 13 Oct 2006 09:45:17 +0200 Jens Axboe wrote: > > Compile tested only. I probably won't get a chance to actually run it until > > late this weekend at the earliest :/ > > Patch looks ok to me. The double lock test only works, as long as splice > is the only one ever locking both mutexes. Or if others follow the same > ordering rules. I'm not very well versed in vfs matters, is that > guarenteed? Taking the lowest-addressed lock first is the usual convention, if we really have to do that. I'm not aware of anywhere else where we pull this trick with i_mutex though.