xfs: fix some minor sparse warnings
authorDave Chinner <david@fromorbit.com>
Mon, 2 Sep 2013 10:49:36 +0000 (20:49 +1000)
committerBen Myers <bpm@sgi.com>
Mon, 9 Sep 2013 22:43:05 +0000 (17:43 -0500)
A couple of simple locking annotations and 0 vs NULL warnings.
Nothing that changes any code behaviour, just removes build noise.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_bmap.c
fs/xfs/xfs_dquot_item.c
fs/xfs/xfs_extent_busy.c
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_itable.c
fs/xfs/xfs_log.c

index 92b830901d60bcf2b662315bb1625b2944964ddf..f47e65c30be6ddde5caa276d3262540d603d07dc 100644 (file)
@@ -4450,7 +4450,7 @@ xfs_bmapi_write(
 {
        struct xfs_mount        *mp = ip->i_mount;
        struct xfs_ifork        *ifp;
-       struct xfs_bmalloca     bma = { 0 };    /* args for xfs_bmap_alloc */
+       struct xfs_bmalloca     bma = { NULL }; /* args for xfs_bmap_alloc */
        xfs_fileoff_t           end;            /* end of mapped file region */
        int                     eof;            /* after the end of extents */
        int                     error;          /* error return */
index 60c6e1f126952acc43e1bbe2a1d065f304ed484d..e838d84b4e85697917c8623418c06ae28140a8b7 100644 (file)
@@ -142,7 +142,8 @@ xfs_qm_dqunpin_wait(
 STATIC uint
 xfs_qm_dquot_logitem_push(
        struct xfs_log_item     *lip,
-       struct list_head        *buffer_list)
+       struct list_head        *buffer_list) __releases(&lip->li_ailp->xa_lock)
+                                             __acquires(&lip->li_ailp->xa_lock)
 {
        struct xfs_dquot        *dqp = DQUOT_ITEM(lip)->qli_dquot;
        struct xfs_buf          *bp = NULL;
index 86f559f6e5d3c3f825df5aeffbf6967a7654f055..e43708e2f0806d4daae241ee32e18abcac1a017f 100644 (file)
@@ -160,7 +160,8 @@ xfs_extent_busy_update_extent(
        struct xfs_extent_busy  *busyp,
        xfs_agblock_t           fbno,
        xfs_extlen_t            flen,
-       bool                    userdata)
+       bool                    userdata) __releases(&pag->pagb_lock)
+                                         __acquires(&pag->pagb_lock)
 {
        xfs_agblock_t           fend = fbno + flen;
        xfs_agblock_t           bbno = busyp->bno;
index bdebc21078d7e83bac4347ad13a5f569ed4d6a0f..21d9c9df9fb72fa0695cc2e2f4a87a0a6550209a 100644 (file)
@@ -71,7 +71,7 @@ xfs_find_handle(
        int                     hsize;
        xfs_handle_t            handle;
        struct inode            *inode;
-       struct fd               f = {0};
+       struct fd               f = {NULL};
        struct path             path;
        int                     error;
        struct xfs_inode        *ip;
index b93e14b86754a6cf6b12e4e9952e911e10a008ad..8a67d53b9b7aa4e5d1dfd6be6ed45a2d1caef8e8 100644 (file)
@@ -541,8 +541,9 @@ xfs_bulkstat_single(
         * at the expense of the error case.
         */
 
-       ino = (xfs_ino_t)*lastinop;
-       error = xfs_bulkstat_one(mp, ino, buffer, sizeof(xfs_bstat_t), 0, &res);
+       ino = *lastinop;
+       error = xfs_bulkstat_one(mp, ino, buffer, sizeof(xfs_bstat_t),
+                                NULL, &res);
        if (error) {
                /*
                 * Special case way failed, do it the "long" way
index 5372d58ef93a26220f0d916763e7f37de63d0050..a2dea108071ae6e81d0e683a98a4a011b74f23ee 100644 (file)
@@ -257,7 +257,8 @@ xlog_grant_head_wait(
        struct xlog             *log,
        struct xlog_grant_head  *head,
        struct xlog_ticket      *tic,
-       int                     need_bytes)
+       int                     need_bytes) __releases(&head->lock)
+                                           __acquires(&head->lock)
 {
        list_add_tail(&tic->t_queue, &head->waiters);