From: Charles Manning <manningc2@actrix.gen.nz>
To: linux-fsdevel@vger.kernel.org
Subject: Is naked reading of inode->i_size OK?
Date: Wed, 10 Oct 2007 12:40:08 +1300 [thread overview]
Message-ID: <200710101240.08069.manningc2@actrix.gen.nz> (raw)
Reading through 2.6.23's vmtruncate() [mm/memory.c], I notice that vmtruncate
reads inode->i_size directly and not through the i_size_read() wrapper. Is
that OK?
Lower down the same function calls i_size_write() and the calling chain calls
i_size_read() so why is i_size_read() not being used here?
int vmtruncate(struct inode * inode, loff_t offset)
{
struct address_space *mapping = inode->i_mapping;
unsigned long limit;
if (inode->i_size < offset)
goto do_expand;
...
}
reply other threads:[~2007-10-09 23:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200710101240.08069.manningc2@actrix.gen.nz \
--to=manningc2@actrix.gen.nz \
--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 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).