From: Christoph Hellwig Subject: Re: [PATCH 1/2] QUOTA cleanup: Use inode->i_blkbits to get block bits Date: Tue, 11 Nov 2008 03:48:48 -0500 Message-ID: <20081111084848.GA2323@infradead.org> References: <1226367627.6352.13.camel@mingming-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Jan Kara , linux-fsdevel To: Mingming Cao Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:59292 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753026AbYKKIs4 (ORCPT ); Tue, 11 Nov 2008 03:48:56 -0500 Content-Disposition: inline In-Reply-To: <1226367627.6352.13.camel@mingming-laptop> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 > > 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 > --- > 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.