mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
fs/hfsplus/wrapper.c: replace shift loop by ilog2
Replace while blocksize;shift by ilog2 Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Vyacheslav Dubeyko <slava@dubeyko.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2cd282a1bc
commit
297cc27207
@ -231,9 +231,7 @@ reread:
|
||||
if (blocksize < HFSPLUS_SECTOR_SIZE || ((blocksize - 1) & blocksize))
|
||||
goto out_free_backup_vhdr;
|
||||
sbi->alloc_blksz = blocksize;
|
||||
sbi->alloc_blksz_shift = 0;
|
||||
while ((blocksize >>= 1) != 0)
|
||||
sbi->alloc_blksz_shift++;
|
||||
sbi->alloc_blksz_shift = ilog2(blocksize);
|
||||
blocksize = min_t(u32, sbi->alloc_blksz, PAGE_SIZE);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user