• H
    shmem_file_write is redundant · 5402b976
    Hugh Dickins 提交于
    With the old aops, writing to a tmpfs file had to use its own special method:
    the generic method would pass in a fresh page to prepare_write when the right
    page was there in swapcache - which was inefficient to handle, even once we'd
    concocted the code to handle it.
    
    With the new aops, the generic method uses shmem_write_end, which lets
    shmem_getpage find the right page: so now abandon shmem_file_write in favour
    of the generic method.  Yes, that does do several things that tmpfs hasn't
    really needed (notably balance_dirty_pages_ratelimited, which ramfs also
    calls); but more use of common code is preferable.
    Signed-off-by: NHugh Dickins <hugh@veritas.com>
    Cc: Nick Piggin <nickpiggin@yahoo.com.au>
    Acked-by: NRik van Riel <riel@redhat.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    5402b976
shmem.c 62.6 KB