• Eric Sandeen's avatar
    simplify some logic in ext4_mb_normalize_request · 38877f4e
    Eric Sandeen authored
    While reading through some of the mballoc code it seems that a couple
    spots in the size normalization function could be streamlined.
    
    The test for non-overlapping PAs can be or'd for the start & end
    conditions, and the tests for adjacent PAs can be else-if'd - 
    it's essentially independently testing:
    
    	if (A + B <= C)
    		...
    	if (A > C)
    		...
    
    These cannot both be true so it seems like the else-if might
    be slightly more efficient and/or informative.
    Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
    Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
    38877f4e
mballoc.c 131 KB