On Mon, Nov 10, 2008 at 05:40:27PM -0800, Mingming Cao wrote: > quota: Use inode->i_blkbits to get block bits > > From: Mingming Cao <cmm@xxxxxxxxxx> > > Andrew has suggested to use inode->i_blkbits to get the block bits info, > rather than use super block's blockbits. That should be faster and emit > less code. > > Signed-off-by: Mingming Cao <cmm@xxxxxxxxxx> > --- > include/linux/quotaops.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > Index: linux-2.6.28-rc2/include/linux/quotaops.h > =================================================================== > --- linux-2.6.28-rc2.orig/include/linux/quotaops.h 2008-11-07 11:23:00.000000000 -0800 > +++ linux-2.6.28-rc2/include/linux/quotaops.h 2008-11-07 11:24:39.000000000 -0800 > @@ -399,26 +399,26 @@ static inline void vfs_dq_free_space(str > static inline int vfs_dq_prealloc_block_nodirty(struct inode *inode, qsize_t nr) > { > return vfs_dq_prealloc_space_nodirty(inode, > - nr << inode->i_sb->s_blocksize_bits); > + nr << inode->i_blkbits); > } > > static inline int vfs_dq_prealloc_block(struct inode *inode, qsize_t nr) > { > return vfs_dq_prealloc_space(inode, > - nr << inode->i_sb->s_blocksize_bits); > + nr << inode->i_blkbits); > } > > static inline int vfs_dq_alloc_block_nodirty(struct inode *inode, qsize_t nr) > { > return vfs_dq_alloc_space_nodirty(inode, > - nr << inode->i_sb->s_blocksize_bits); > + nr << inode->i_blkbits); > } > > > static inline int vfs_dq_alloc_block(struct inode *inode, qsize_t nr) > { > return vfs_dq_alloc_space(inode, > - nr << inode->i_sb->s_blocksize_bits); > + nr << inode->i_blkbits); All these cals no fit onto a single line. -- 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