• H
    drm/i915: use shmem_truncate_range · e2377fe0
    Hugh Dickins 提交于
    The interface to ->truncate_range is changing very slightly: once "tmpfs:
    take control of its truncate_range" has been applied, this can be applied.
     For now there is only a slight inefficiency while this remains unapplied,
    but it will soon become essential for managing shmem's use of swap.
    
    Change i915_gem_object_truncate() to use shmem_truncate_range() directly:
    which should also spare i915 later change if we switch from
    inode_operations->truncate_range to file_operations->fallocate.
    Signed-off-by: NHugh Dickins <hughd@google.com>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Keith Packard <keithp@keithp.com>
    Cc: Dave Airlie <airlied@redhat.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    e2377fe0
i915_gem.c 103.8 KB