• Hugh Dickins's avatar
    [PATCH] shmem: misc changes and cleanups · 42ec8004
    Hugh Dickins authored
    If PAGE_CACHE_SIZE were to differ from PAGE_SIZE, the VM_ACCT macro,
    and shmem_nopage's vm_pgoff manipulation, were still not quite right.
    
    Slip a cond_resched_lock into shmem_truncate's long loop; but not into
    shmem_unuse_inode's, since other locks held, and swapoff awful anyway.
    
    Move SetPageUptodate to where it's not already set.  Replace
    copy_from_user by __copy_from_user since access already verified.
    
    Replace BUG()s by BUG_ON()s.  Remove an uninteresting PAGE_BUG().
    42ec8004
shmem.c 45.6 KB