From: Al Viro Date: Sat, 13 Apr 2019 00:38:01 +0000 (-0400) Subject: don't open-code file_count() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=79ea35bc20a1b16f2ebd0f70a5a1041a121a2366;p=linux.git don't open-code file_count() Signed-off-by: Al Viro --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 8558e81fdc2af..3c724cc949a5f 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4354,7 +4354,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,