]> Pileus Git - ~andy/linux/blobdiff - fs/ext4/mballoc.c
ext4: code cleanup in mb_find_buddy()
[~andy/linux] / fs / ext4 / mballoc.c
index ae4d7f5edbbf1493f6d7da728a03f5935cd554b7..1791dd4207d5f8af0ca2ede799a5cefbd2b7a187 100644 (file)
@@ -432,9 +432,10 @@ static void *mb_find_buddy(struct ext4_buddy *e4b, int order, int *max)
        }
 
        /* at order 0 we see each particular block */
-       *max = 1 << (e4b->bd_blkbits + 3);
-       if (order == 0)
+       if (order == 0) {
+               *max = 1 << (e4b->bd_blkbits + 3);
                return EXT4_MB_BITMAP(e4b);
+       }
 
        bb = EXT4_MB_BUDDY(e4b) + EXT4_SB(e4b->bd_sb)->s_mb_offsets[order];
        *max = EXT4_SB(e4b->bd_sb)->s_mb_maxs[order];