提交 38885bd4 编写于 作者: C Coywolf Qi Hunt 提交者: Linus Torvalds

[PATCH] sb_set_blocksize cleanup

sb_set_blocksize() cleanup: make sb_set_blocksize() use blksize_bits().
Signed-off-by: NCoywolf Qi Hunt <qiyong@fc-cn.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 a94ddf3a
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册