linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Ted Ts'o <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>,
	linux-ext4@vger.kernel.org, Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] ext4: Convert ext4 to new truncate calling convention
Date: Wed, 25 May 2011 17:34:47 +0200	[thread overview]
Message-ID: <20110525153447.GA24867@quack.suse.cz> (raw)
In-Reply-To: <20110525134536.GB8476@thunk.org>

On Wed 25-05-11 09:45:36, Ted Tso wrote:
> On Wed, May 25, 2011 at 10:43:08AM +0200, Jan Kara wrote:
> >  int ext4_can_truncate(struct inode *inode)
> >  {
> > -	if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
> > -		return 0;
> 
> I agree this change is correct, but I noticed that at the VFS level,
> the ftruncate() path doesn't seem to check for IS_APPEND() and
> IS_IMMUTABLE().  Am I missing something?  Fixing that should be a
> separate patch, of course, but it does seem to be a problem.
  It does check it - IMMUTABLE file cannot be open for writing so cannot
be ftruncated, APPEND file is checked in do_sys_ftruncate() AFAICS.


								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

      reply	other threads:[~2011-05-25 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-25  8:43 [PATCH] ext4: Convert ext4 to new truncate calling convention Jan Kara
2011-05-25  9:15 ` Jan Kara
2011-05-25 13:45 ` Ted Ts'o
2011-05-25 15:34   ` Jan Kara [this message]

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=20110525153447.GA24867@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).