From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [patch 14/15] vfs: utimes immutable fix Date: Mon, 5 May 2008 07:14:14 -0400 Message-ID: <20080505111414.GI20910@infradead.org> References: <20080505095440.820370974@szeredi.hu> <20080505095530.431609833@szeredi.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@linux-foundation.org, hch@infradead.org, viro@ZenIV.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Ulrich Drepper To: Miklos Szeredi Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:55570 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753864AbYEELOS (ORCPT ); Mon, 5 May 2008 07:14:18 -0400 Content-Disposition: inline In-Reply-To: <20080505095530.431609833@szeredi.hu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, May 05, 2008 at 11:54:55AM +0200, Miklos Szeredi wrote: > From: Miklos Szeredi > > If updating file times to the current time and using a file > descriptor, then don't check for immutable inode, only if the file is > opened for write. In this case immutability has been checked at open > time. This is the same as how write() and ftruncate() are handled. > > Signed-off-by: Miklos Szeredi > CC: Ulrich Drepper > --- > fs/utimes.c | 3 --- > 1 file changed, 3 deletions(-) > > Index: linux-2.6/fs/utimes.c > =================================================================== > --- linux-2.6.orig/fs/utimes.c 2008-05-05 11:29:28.000000000 +0200 > +++ linux-2.6/fs/utimes.c 2008-05-05 11:29:28.000000000 +0200 > @@ -110,9 +110,6 @@ static int do_fd_utimes(int fd, struct t > struct inode *inode = file->f_path.dentry->d_inode; > > error = -EACCES; > - if (IS_IMMUTABLE(inode)) > - goto out_fput; > - Looks good, but please re-order it before the cleanup so we can put it in for .26.