Merge tag 'drm-intel-next-2019-05-24' of git://anongit.freedesktop.org/drm/drm-intel...
[linux-2.6-microblaze.git] / drivers / gpu / drm / i915 / i915_gem.c
index 7cafd56..d3b7dac 100644 (file)
@@ -3976,7 +3976,7 @@ static bool discard_backing_storage(struct drm_i915_gem_object *obj)
         * acquiring such a reference whilst we are in the middle of
         * freeing the object.
         */
-       return atomic_long_read(&obj->base.filp->f_count) == 1;
+       return file_count(obj->base.filp) == 1;
 }
 
 static void __i915_gem_free_objects(struct drm_i915_private *i915,