From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael Kerrisk" Subject: Re: [PATCH] utimensat() non-conformances and fixes -- version 2 Date: Mon, 19 May 2008 14:24:37 +0200 Message-ID: References: <482D4665.4050401@gmail.com> <482F38A1.9070704@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: drepper@redhat.com, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-man@vger.kernel.org, linux-fsdevel@vger.kernel.org To: "Miklos Szeredi" Return-path: Received: from rv-out-0506.google.com ([209.85.198.224]:31293 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754485AbYESMYi (ORCPT ); Mon, 19 May 2008 08:24:38 -0400 Received: by rv-out-0506.google.com with SMTP id l9so1426536rvb.1 for ; Mon, 19 May 2008 05:24:37 -0700 (PDT) In-Reply-To: Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Miklos, On Mon, May 19, 2008 at 11:50 AM, Miklos Szeredi wrote: >> Regarding your suggestions above, are you meaning something like the >> patch below? > > Yes. > >> The patch is a little less pretty than I'd like because of the need to >> return EACCES or EPERM depending on whether (times == NULL). In >> particular, these lines in utimes.c: >> >> + if (!times && error == -EPERM) >> + error = -EACCES; >> >> seem a little fragile (but maybe I worry too much). > > It's not only fragile, it's ugly as sin. I'd rather do it this way: > > - initialize error to zero > - if no write access then set error, and the ATTR_TIMES_UPDATE(*) flag > - set error2 from result of notify_change() > - if error is zero then return error2, otherwise return error > > (*) I've been mulling over the name and perhaps ATTR_OWNER_CHECK would > be better, or something that implies that it's not really about > updating the times, but about checking the owner. This all makes sense, but... > Also could you do the patch against the > > git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git vfs-cleanups > > tree, which does big structural cleanups to do_utimes? You keep moving the goalposts here... First, it was provide an obvious correct fix (for the non-conformances); then: can you cleanup the owner checks; then: can you rewrite against my git tree... My time at the moment is fairly limited, and I have a problem: currently, I'm not a git user. That'll change soon, but I don't have the time to change it now. Can I just download a snapshot tarball of your git changes somehwere? Alternatively, when do you expect your changes to make it into an rc? Cheers, Michael