summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-07-03 00:25:02 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-03 15:27:06 -0700
commitd8aa905b429700e8b6b6b301a8ac2d4a24f2c19b (patch)
tree7ba82a5ae7bb63fe45f404424a470c126e59e6da /fs
parent2b105ff9cccea5533ad518bb37dc9b43a322f7b1 (diff)
downloadop-kernel-dev-d8aa905b429700e8b6b6b301a8ac2d4a24f2c19b.zip
op-kernel-dev-d8aa905b429700e8b6b6b301a8ac2d4a24f2c19b.tar.gz
[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>
Diffstat (limited to 'fs')
-rw-r--r--fs/direct-io.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 538fb04..5981e17f 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -220,7 +220,8 @@ static void dio_complete(struct dio *dio, loff_t offset, ssize_t bytes)
if (dio->end_io && dio->result)
dio->end_io(dio->iocb, offset, bytes, dio->map_bh.b_private);
if (dio->lock_type == DIO_LOCKING)
- up_read(&dio->inode->i_alloc_sem);
+ /* lockdep: non-owner release */
+ up_read_non_owner(&dio->inode->i_alloc_sem);
}
/*
@@ -1261,7 +1262,8 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
}
if (dio_lock_type == DIO_LOCKING)
- down_read(&inode->i_alloc_sem);
+ /* lockdep: not the owner will release it */
+ down_read_non_owner(&inode->i_alloc_sem);
}
/*
OpenPOWER on IntegriCloud