Is naked reading of inode->i_size OK?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
 	...
}
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux