All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: NeilBrown <neilb@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	Trond Myklebust <trond.myklebust@fys.uio.no>
Subject: Re: [PATCH ] Fix some problems with truncate and mtime semantics.
Date: Tue, 15 Nov 2005 09:56:11 +0000	[thread overview]
Message-ID: <20051115095610.GA23605@infradead.org> (raw)
In-Reply-To: <1051115020002.9459@suse.de>

> -int do_truncate(struct dentry *dentry, loff_t length, struct file *filp)
> +int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
> +	struct file *filp)
>  {
>  	int err;
>  	struct iattr newattrs;
> @@ -204,7 +205,7 @@ int do_truncate(struct dentry *dentry, l
>  		return -EINVAL;
>  
>  	newattrs.ia_size = length;
> -	newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
> +	newattrs.ia_valid = ATTR_SIZE | time_attrs;

I'd rather make the argument and boolean update_times flag and this:


	newattrs.ia_valid = ATTR_SIZE;
	if (update_times)
		newattrs.ia_valid |= ATTR_CTIME|ATTR_MTIME;

but except for that little nitpick the patch looks good.  thanks.


  parent reply	other threads:[~2005-11-15  9:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20051115125657.9403.patches@notabene>
2005-11-15  2:00 ` [PATCH ] Fix some problems with truncate and mtime semantics NeilBrown
2005-11-15  2:03   ` Trond Myklebust
2005-11-15  2:09     ` Neil Brown
2005-11-15 11:15     ` Anton Altaparmakov
2005-11-15  9:56   ` Christoph Hellwig [this message]
2005-11-15 10:16     ` Andrew Morton
2005-11-15 10:13   ` Miklos Szeredi
2005-11-15 10:41     ` Neil Brown
2005-11-15 12:48       ` Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051115095610.GA23605@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=trond.myklebust@fys.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.