linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is naked reading of inode->i_size OK?
@ 2007-10-09 23:40 Charles Manning
  0 siblings, 0 replies; only message in thread
From: Charles Manning @ 2007-10-09 23:40 UTC (permalink / raw)
  To: linux-fsdevel

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;
 	...
}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-09 23:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-09 23:40 Is naked reading of inode->i_size OK? Charles Manning

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).