[Intel-gfx] [PATCH 02/21] drm/i915: introduce simple gemfs

Chris Wilson chris at chris-wilson.co.uk
Sat Sep 23 08:36:19 UTC 2017


Quoting Matthew Auld (2017-09-22 18:32:33)
> +static int i915_gem_object_create_shmem(struct drm_device *dev,
> +                                       struct drm_gem_object *obj,
> +                                       size_t size)
> +{
> +       struct drm_i915_private *i915 = to_i915(dev);
> +       struct file *filp;
> +
> +       drm_gem_private_object_init(dev, obj, size);
> +
> +       if (i915->mm.gemfs)
> +               filp = shmem_file_setup_with_mnt(i915->mm.gemfs, "i915", size,
> +                                                VM_NORESERVE);
> +       else
> +               filp = shmem_file_setup("i915", size, VM_NORESERVE);

Smells like the shmem_file_setup() is fishy.

This supports my argument that you should just expand shmem_file_setup()
to always take the vfsmount, passing #define TMPFS_MNT NULL.
-Chris


More information about the Intel-gfx mailing list