aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/block_dev.c6
1 files changed, 1 insertions, 5 deletions
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);
86 86
87int sb_set_blocksize(struct super_block *sb, int size) 87int sb_set_blocksize(struct super_block *sb, int size)
88{ 88{
89 int bits = 9; /* 2^9 = 512 */
90
91 if (set_blocksize(sb->s_bdev, size)) 89 if (set_blocksize(sb->s_bdev, size))
92 return 0; 90 return 0;
93 /* If we get here, we know size is power of two 91 /* If we get here, we know size is power of two
94 * and it's value is between 512 and PAGE_SIZE */ 92 * and it's value is between 512 and PAGE_SIZE */
95 sb->s_blocksize = size; 93 sb->s_blocksize = size;
96 for (size >>= 10; size; size >>= 1) 94 sb->s_blocksize_bits = blksize_bits(size);
97 ++bits;
98 sb->s_blocksize_bits = bits;
99 return sb->s_blocksize; 95 return sb->s_blocksize;
100} 96}
101 97