Merge branch 'drm-next' of git://people.freedesktop.org/~dvdhrm/linux into drm-next
[deliverable/linux.git] / fs / hfsplus / wrapper.c
index 3f999649587ff8185ebd326c3672acee83542de4..cc623567143769b95d60a45a46b2f17e889773d0 100644 (file)
@@ -24,8 +24,8 @@ struct hfsplus_wd {
        u16 embed_count;
 };
 
-/*
- * hfsplus_submit_bio - Perfrom block I/O
+/**
+ * hfsplus_submit_bio - Perform block I/O
  * @sb: super block of volume for I/O
  * @sector: block to read or write, for blocks of HFSPLUS_SECTOR_SIZE bytes
  * @buf: buffer for I/O
@@ -231,10 +231,8 @@ 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++;
-       blocksize = min(sbi->alloc_blksz, (u32)PAGE_SIZE);
+       sbi->alloc_blksz_shift = ilog2(blocksize);
+       blocksize = min_t(u32, sbi->alloc_blksz, PAGE_SIZE);
 
        /*
         * Align block size to block offset.
This page took 0.062061 seconds and 5 git commands to generate.