浏览代码

drm/i915: Do not return -1 from shrinker when nr_to_scan == 0

The error code is only expected during the actual pruning and not during
the first measurement (nr_to_scan == 0) pass.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson 14 年之前
父节点
当前提交
bbe2e11a4b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/gpu/drm/i915/i915_gem.c

+ 1 - 1
drivers/gpu/drm/i915/i915_gem.c

@@ -4994,7 +4994,7 @@ i915_gem_inactive_shrink(struct shrinker *shrinker,
 	int cnt;
 	int cnt;
 
 
 	if (!mutex_trylock(&dev->struct_mutex))
 	if (!mutex_trylock(&dev->struct_mutex))
-		return nr_to_scan ? 0 : -1;
+		return 0;
 
 
 	/* "fast-path" to count number of available objects */
 	/* "fast-path" to count number of available objects */
 	if (nr_to_scan == 0) {
 	if (nr_to_scan == 0) {