Skip to content

Commit

Permalink
[PATCH] sb_set_blocksize cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Coywolf Qi Hunt authored and Linus Torvalds committed Mar 24, 2006
1 parent a94ddf3 commit 38885bd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 38885bd

Please sign in to comment.