Commit d8aa905b429700e8b6b6b301a8ac2d4a24f2c19b
Committed by
Linus Torvalds
1 parent
2b105ff9cc
Exists in
master
and in
20 other branches
[PATCH] lockdep: annotate direct io
Teach special (rwsem-in-irq) locking code to the lock validator. Has no effect on non-lockdep kernels. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff
fs/direct-io.c
... | ... | @@ -220,7 +220,8 @@ |
220 | 220 | if (dio->end_io && dio->result) |
221 | 221 | dio->end_io(dio->iocb, offset, bytes, dio->map_bh.b_private); |
222 | 222 | if (dio->lock_type == DIO_LOCKING) |
223 | - up_read(&dio->inode->i_alloc_sem); | |
223 | + /* lockdep: non-owner release */ | |
224 | + up_read_non_owner(&dio->inode->i_alloc_sem); | |
224 | 225 | } |
225 | 226 | |
226 | 227 | /* |
... | ... | @@ -1261,7 +1262,8 @@ |
1261 | 1262 | } |
1262 | 1263 | |
1263 | 1264 | if (dio_lock_type == DIO_LOCKING) |
1264 | - down_read(&inode->i_alloc_sem); | |
1265 | + /* lockdep: not the owner will release it */ | |
1266 | + down_read_non_owner(&inode->i_alloc_sem); | |
1265 | 1267 | } |
1266 | 1268 | |
1267 | 1269 | /* |