]> err.no Git - linux-2.6/commitdiff
[XFS] Add lock annotations to xfs_trans_update_ail and
authorJosh Triplett <josh@freedesktop.org>
Thu, 28 Sep 2006 01:04:07 +0000 (11:04 +1000)
committerTim Shimmin <tes@sgi.com>
Thu, 28 Sep 2006 01:04:07 +0000 (11:04 +1000)
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>
fs/xfs/xfs_trans_ail.c
fs/xfs/xfs_trans_priv.h

index 558c87ff0c41faeea2da96536da6cf250c2e095d..fc39b166d403e609e356008f05c23fcb682d8b28 100644 (file)
@@ -276,7 +276,7 @@ xfs_trans_update_ail(
        xfs_mount_t     *mp,
        xfs_log_item_t  *lip,
        xfs_lsn_t       lsn,
-       unsigned long   s)
+       unsigned long   s) __releases(mp->m_ail_lock)
 {
        xfs_ail_entry_t         *ailp;
        xfs_log_item_t          *dlip=NULL;
@@ -328,7 +328,7 @@ void
 xfs_trans_delete_ail(
        xfs_mount_t     *mp,
        xfs_log_item_t  *lip,
-       unsigned long   s)
+       unsigned long   s) __releases(mp->m_ail_lock)
 {
        xfs_ail_entry_t         *ailp;
        xfs_log_item_t          *dlip;
index 13edab8a9e94d20493eb227afa5b77f45be9d5d8..447ac4308c917cd445a5a0acea364a7b567d5405 100644 (file)
@@ -46,11 +46,13 @@ xfs_log_busy_slot_t         *xfs_trans_add_busy(xfs_trans_t *tp,
 /*
  * From xfs_trans_ail.c
  */
-void                   xfs_trans_update_ail(struct xfs_mount *,
-                                    struct xfs_log_item *, xfs_lsn_t,
-                                    unsigned long);
-void                   xfs_trans_delete_ail(struct xfs_mount *,
-                                    struct xfs_log_item *, unsigned long);
+void                   xfs_trans_update_ail(struct xfs_mount *mp,
+                                    struct xfs_log_item *lip, xfs_lsn_t lsn,
+                                    unsigned long s)
+                                    __releases(mp->m_ail_lock);
+void                   xfs_trans_delete_ail(struct xfs_mount *mp,
+                                    struct xfs_log_item *lip, unsigned long s)
+                                    __releases(mp->m_ail_lock);
 struct xfs_log_item    *xfs_trans_first_ail(struct xfs_mount *, int *);
 struct xfs_log_item    *xfs_trans_next_ail(struct xfs_mount *,
                                     struct xfs_log_item *, int *, int *);