• Andrew Morton's avatar
    [PATCH] Fix for latent bug in vmtruncate() · 98063ca7
    Andrew Morton authored
    From: "Paul E. McKenney" <paulmck@us.ibm.com>
    
    The vmtruncate() function shifts down by PAGE_CACHE_SHIFT, then calls
    vmtruncate_list(), which deals in terms of PAGE_SHIFT instead.  Currently,
    no harm done, since PAGE_CACHE_SHIFT and PAGE_SHIFT are identical.  Some
    day they might not be, hence this patch.
    
    I also took the liberty of modifying a hand-coded "if" that seems to
    optimize for files that are not mapped to instead use unlikely().
    98063ca7
memory.c 40.8 KB