From: Coywolf Qi Hunt Date: Fri, 24 Mar 2006 11:18:05 +0000 (-0800) Subject: [PATCH] sb_set_blocksize cleanup X-Git-Tag: v2.6.17-rc1~908 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=38885bd4c2a4b59ddb22271d3e6c621859c76f02;p=karo-tx-linux.git [PATCH] sb_set_blocksize cleanup sb_set_blocksize() cleanup: make sb_set_blocksize() use blksize_bits(). Signed-off-by: Coywolf Qi Hunt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/block_dev.c b/fs/block_dev.c index 2d096057ab53..573fc8e0b67a 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -86,16 +86,12 @@ EXPORT_SYMBOL(set_blocksize); int sb_set_blocksize(struct super_block *sb, int size) { - int bits = 9; /* 2^9 = 512 */ - if (set_blocksize(sb->s_bdev, size)) return 0; /* If we get here, we know size is power of two * and it's value is between 512 and PAGE_SIZE */ sb->s_blocksize = size; - for (size >>= 10; size; size >>= 1) - ++bits; - sb->s_blocksize_bits = bits; + sb->s_blocksize_bits = blksize_bits(size); return sb->s_blocksize; }