Skip to content

Commit

Permalink
drm/i915: Do not return -1 from shrinker when nr_to_scan == 0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Wilson committed Oct 28, 2010
1 parent 4a684a4 commit bbe2e11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -4994,7 +4994,7 @@ i915_gem_inactive_shrink(struct shrinker *shrinker,
int cnt;

if (!mutex_trylock(&dev->struct_mutex))
return nr_to_scan ? 0 : -1;
return 0;

/* "fast-path" to count number of available objects */
if (nr_to_scan == 0) {
Expand Down

0 comments on commit bbe2e11

Please sign in to comment.