From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amerigo Wang Subject: Re: [Patch] pipe: use file_update_time() when hold i_mutex Date: Wed, 22 Jul 2009 17:21:50 +0800 Message-ID: <4A66DA2E.90601@redhat.com> References: <20090706053745.6338.50777.sendpatchset@localhost.localdomain> <20090720141150.e9d081ca.akpm@linux-foundation.org> <4A65934B.9050904@redhat.com> <1248174580.28516.595.camel@tucsk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Andrew Morton , linux-kernel@vger.kernel.org, heiko.carstens@de.ibm.com, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk To: Miklos Szeredi Return-path: Received: from mx2.redhat.com ([66.187.237.31]:47325 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751000AbZGVJTl (ORCPT ); Wed, 22 Jul 2009 05:19:41 -0400 In-Reply-To: <1248174580.28516.595.camel@tucsk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Miklos Szeredi wrote: > On Tue, 2009-07-21 at 18:07 +0800, Amerigo Wang wrote: > >> Andrew Morton wrote: >> >>> On Mon, 6 Jul 2009 01:35:30 -0400 >>> Amerigo Wang wrote: >>> >>> >>> >>>> file_update_time() should be called with i_mutex held, >>>> move it before mutex_unlock(). >>>> >>>> >>>> >>> Why do you believe that file_update_time() needs i_mutex? >>> >>> >> file_update_time() modifies inode, no? :) >> > > So does touch_atime(), yet neither needs i_mutex. > Yes? Then how the inode is protected when file_update_time() modifies it? Thanks.