diff options
author | Peter Zijlstra <peterz@infradead.org> | 2016-11-30 14:32:25 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-11-30 14:32:25 +1100 |
commit | f8319483f57f1ca22370f4150bb990aca7728a67 (patch) | |
tree | 348cff60f15f3282e5489fba4dfd46b6c958e533 /fs/xfs | |
parent | 3816199506c7826983096fc65ed46f2733a47bb8 (diff) | |
download | talos-obmc-linux-f8319483f57f1ca22370f4150bb990aca7728a67.tar.gz talos-obmc-linux-f8319483f57f1ca22370f4150bb990aca7728a67.zip |
locking/lockdep: Provide a type check for lock_is_held
Christoph requested lockdep_assert_held() variants that distinguish
between held-for-read or held-for-write.
Provide:
int lock_is_held_type(struct lockdep_map *lock, int read)
which takes the same argument as lock_acquire(.read) and matches it to
the held_lock instance.
Use of this function should be gated by the debug_locks variable. When
that is 0 the return value of the lock_is_held_type() function is
undefined. This is done to allow both negative and positive tests for
holding locks.
By default we provide (positive) lockdep_assert_held{,_exclusive,_read}()
macros.
Requested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs')
0 files changed, 0 insertions, 0 deletions