diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-28 17:35:07 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-28 17:35:07 -0400 |
commit | bbe2e11a4b683ead070ad5823cdf756e1525b903 (patch) | |
tree | 10c5e8c5c5dec1423954de91be41c04962ddeda1 | |
parent | 4a684a4117abd756291969336af454e8a958802f (diff) |
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>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index d4d8f888db85..7569b77fb403 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -4994,7 +4994,7 @@ i915_gem_inactive_shrink(struct shrinker *shrinker, | |||
4994 | int cnt; | 4994 | int cnt; |
4995 | 4995 | ||
4996 | if (!mutex_trylock(&dev->struct_mutex)) | 4996 | if (!mutex_trylock(&dev->struct_mutex)) |
4997 | return nr_to_scan ? 0 : -1; | 4997 | return 0; |
4998 | 4998 | ||
4999 | /* "fast-path" to count number of available objects */ | 4999 | /* "fast-path" to count number of available objects */ |
5000 | if (nr_to_scan == 0) { | 5000 | if (nr_to_scan == 0) { |