Skip to content

Commit 1feace5

Browse files
committed
drm/i915: Replace rcu_swap_protected() with rcu_replace_pointer()
This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds <[email protected]> [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Joonas Lahtinen <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Rodrigo Vivi <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Chris Wilson <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Cc: <[email protected]> Cc: <[email protected]>
1 parent 12e78e6 commit 1feace5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/gem/i915_gem_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,7 @@ set_engines(struct i915_gem_context *ctx,
16291629
i915_gem_context_set_user_engines(ctx);
16301630
else
16311631
i915_gem_context_clear_user_engines(ctx);
1632-
rcu_swap_protected(ctx->engines, set.engines, 1);
1632+
set.engines = rcu_replace_pointer(ctx->engines, set.engines, 1);
16331633
mutex_unlock(&ctx->engines_mutex);
16341634

16351635
call_rcu(&set.engines->rcu, free_engines_rcu);

0 commit comments

Comments
 (0)