diff options
author | Coywolf Qi Hunt <qiyong@fc-cn.com> | 2006-03-24 11:18:05 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-24 15:33:25 (GMT) |
commit | 38885bd4c2a4b59ddb22271d3e6c621859c76f02 (patch) | |
tree | 60a4528db40c182f7091c8d84433542dabbc8faa /fs/block_dev.c | |
parent | a94ddf3ab866df9c187c9d8b3870b7ec38c6f7ad (diff) | |
download | linux-fsl-qoriq-38885bd4c2a4b59ddb22271d3e6c621859c76f02.tar.xz |
[PATCH] sb_set_blocksize cleanup
sb_set_blocksize() cleanup: make sb_set_blocksize() use blksize_bits().
Signed-off-by: Coywolf Qi Hunt <qiyong@fc-cn.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 2d09605..573fc8e 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; } |