Commit 023d43c7b5a23a81fe8afa9f37296f8ed4be11fb

Authored by Peter Zijlstra
Committed by Peter Zijlstra
1 parent aea1f7964a

lockdep: Fix lockdep annotation for pipe_double_lock()

The presumed use of the pipe_double_lock() routine is to lock 2 locks in
a deadlock free way by ordering the locks by their address. However it
fails to keep the specified lock classes in order and explicitly
annotates a deadlock.

Rectify this.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Miklos Szeredi <mszeredi@suse.cz>
LKML-Reference: <1248163763.15751.11098.camel@twins>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -68,8 +68,8 @@
68 68 pipe_lock_nested(pipe1, I_MUTEX_PARENT);
69 69 pipe_lock_nested(pipe2, I_MUTEX_CHILD);
70 70 } else {
71   - pipe_lock_nested(pipe2, I_MUTEX_CHILD);
72   - pipe_lock_nested(pipe1, I_MUTEX_PARENT);
  71 + pipe_lock_nested(pipe2, I_MUTEX_PARENT);
  72 + pipe_lock_nested(pipe1, I_MUTEX_CHILD);
73 73 }
74 74 }
75 75