Skip to content
  • Hugh Dickins's avatar
    shmem_file_write is redundant · 5402b976
    Hugh Dickins authored
    
    
    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: default avatarHugh Dickins <hugh@veritas.com>
    Cc: Nick Piggin <nickpiggin@yahoo.com.au>
    Acked-by: default avatarRik van Riel <riel@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    5402b976