aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorJosh Triplett <josh@freedesktop.org>2006-09-27 21:04:07 -0400
committerTim Shimmin <tes@sgi.com>2006-09-27 21:04:07 -0400
commit22d91f65d57a7f1a1c5fc81f47b47b0cc54ad6f7 (patch)
treeb8110f18127ef5882987cd7c7aabbd6801d391cc /fs/xfs
parent68c3271515f11f6665dc8732e53aaab3d3fdd7d3 (diff)
[XFS] Add lock annotations to xfs_trans_update_ail and
xfs_trans_delete_ail xfs_trans_update_ail and xfs_trans_delete_ail get called with the AIL lock held, and release it. Add lock annotations to these two functions so that sparse can check callers for lock pairing, and so that sparse will not complain about these functions since they intentionally use locks in this manner. SGI-PV: 954580 SGI-Modid: xfs-linux-melb:xfs-kern:26807a Signed-off-by: Josh Triplett <josh@freedesktop.org> Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_trans_ail.c4
-rw-r--r--fs/xfs/xfs_trans_priv.h12
2 files changed, 9 insertions, 7 deletions
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
index 558c87ff0c41..fc39b166d403 100644
--- a/fs/xfs/xfs_trans_ail.c
+++ b/fs/xfs/xfs_trans_ail.c
@@ -276,7 +276,7 @@ xfs_trans_update_ail(
276 xfs_mount_t *mp, 276 xfs_mount_t *mp,
277 xfs_log_item_t *lip, 277 xfs_log_item_t *lip,
278 xfs_lsn_t lsn, 278 xfs_lsn_t lsn,
279 unsigned long s) 279 unsigned long s) __releases(mp->m_ail_lock)
280{ 280{
281 xfs_ail_entry_t *ailp; 281 xfs_ail_entry_t *ailp;
282 xfs_log_item_t *dlip=NULL; 282 xfs_log_item_t *dlip=NULL;
@@ -328,7 +328,7 @@ void
328xfs_trans_delete_ail( 328xfs_trans_delete_ail(
329 xfs_mount_t *mp, 329 xfs_mount_t *mp,
330 xfs_log_item_t *lip, 330 xfs_log_item_t *lip,
331 unsigned long s) 331 unsigned long s) __releases(mp->m_ail_lock)
332{ 332{
333 xfs_ail_entry_t *ailp; 333 xfs_ail_entry_t *ailp;
334 xfs_log_item_t *dlip; 334 xfs_log_item_t *dlip;
diff --git a/fs/xfs/xfs_trans_priv.h b/fs/xfs/xfs_trans_priv.h
index 13edab8a9e94..447ac4308c91 100644
--- a/fs/xfs/xfs_trans_priv.h
+++ b/fs/xfs/xfs_trans_priv.h
@@ -46,11 +46,13 @@ xfs_log_busy_slot_t *xfs_trans_add_busy(xfs_trans_t *tp,
46/* 46/*
47 * From xfs_trans_ail.c 47 * From xfs_trans_ail.c
48 */ 48 */
49void xfs_trans_update_ail(struct xfs_mount *, 49void xfs_trans_update_ail(struct xfs_mount *mp,
50 struct xfs_log_item *, xfs_lsn_t, 50 struct xfs_log_item *lip, xfs_lsn_t lsn,
51 unsigned long); 51 unsigned long s)
52void xfs_trans_delete_ail(struct xfs_mount *, 52 __releases(mp->m_ail_lock);
53 struct xfs_log_item *, unsigned long); 53void xfs_trans_delete_ail(struct xfs_mount *mp,
54 struct xfs_log_item *lip, unsigned long s)
55 __releases(mp->m_ail_lock);
54struct xfs_log_item *xfs_trans_first_ail(struct xfs_mount *, int *); 56struct xfs_log_item *xfs_trans_first_ail(struct xfs_mount *, int *);
55struct xfs_log_item *xfs_trans_next_ail(struct xfs_mount *, 57struct xfs_log_item *xfs_trans_next_ail(struct xfs_mount *,
56 struct xfs_log_item *, int *, int *); 58 struct xfs_log_item *, int *, int *);