From: Al Viro <viro@ZenIV.linux.org.uk>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] procfs: stop using vmtruncate
Date: Tue, 21 Jun 2011 03:05:26 +0100 [thread overview]
Message-ID: <20110621020526.GY11521@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20110620224727.GA22187@infradead.org>
On Mon, Jun 20, 2011 at 06:47:27PM -0400, Christoph Hellwig wrote:
> Procfs doens't have any ->truncate instances, so all vmtruncate calls can
> be replaced with truncate_setsize, given that we've just done the
> inode_newsize_ok check as part of inode_change_ok just before.
What files on procfs allow meaningful truncate anyway? I agree that
vmtruncate() there is bogus, but AFAICT we have the following picture:
* there are files with non-zero i_size (/proc/kcore and
/proc/bus/pci/*/*); for any of those ATTR_SIZE should fail and I don't
think it should fail silently.
* the rest has size 0 and for those ATTR_SIZE to non-0 length
should definitely fail with an error.
next prev parent reply other threads:[~2011-06-21 2:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 22:47 [PATCH] procfs: stop using vmtruncate Christoph Hellwig
2011-06-21 2:05 ` Al Viro [this message]
2011-06-21 7:43 ` Christoph Hellwig
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=20110621020526.GY11521@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
/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.