diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-08-31 18:11:06 -0400 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-09-02 11:22:19 -0400 |
commit | 7bf7a193a90cadccaad21c5970435c665c40fe27 (patch) | |
tree | 8246e0d6e4e57723ed4e657d2a4744c3511fd5a7 | |
parent | d897246df9fc0a5df97a784bf7b072be4a6ae479 (diff) |
xfs: fix compiler warnings
Fix up all the compiler warnings that have crept in.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap.c | 2 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_inode_fork.c | 9 | ||||
-rw-r--r-- | fs/xfs/xfs_buf_item.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_iops.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 4 |
5 files changed, 11 insertions, 8 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 9558f5ee1bf9..459f4b4f08fe 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c | |||
@@ -579,7 +579,7 @@ xfs_bmap_validate_ret( | |||
579 | 579 | ||
580 | #else | 580 | #else |
581 | #define xfs_bmap_check_leaf_extents(cur, ip, whichfork) do { } while (0) | 581 | #define xfs_bmap_check_leaf_extents(cur, ip, whichfork) do { } while (0) |
582 | #define xfs_bmap_validate_ret(bno,len,flags,mval,onmap,nmap) | 582 | #define xfs_bmap_validate_ret(bno,len,flags,mval,onmap,nmap) do { } while (0) |
583 | #endif /* DEBUG */ | 583 | #endif /* DEBUG */ |
584 | 584 | ||
585 | /* | 585 | /* |
diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c index fb310d08dc82..31840ca24018 100644 --- a/fs/xfs/libxfs/xfs_inode_fork.c +++ b/fs/xfs/libxfs/xfs_inode_fork.c | |||
@@ -1499,14 +1499,11 @@ xfs_iext_realloc_indirect( | |||
1499 | xfs_ifork_t *ifp, /* inode fork pointer */ | 1499 | xfs_ifork_t *ifp, /* inode fork pointer */ |
1500 | int new_size) /* new indirection array size */ | 1500 | int new_size) /* new indirection array size */ |
1501 | { | 1501 | { |
1502 | int nlists; /* number of irec's (ex lists) */ | ||
1503 | int size; /* current indirection array size */ | ||
1504 | |||
1505 | ASSERT(ifp->if_flags & XFS_IFEXTIREC); | 1502 | ASSERT(ifp->if_flags & XFS_IFEXTIREC); |
1506 | nlists = ifp->if_real_bytes / XFS_IEXT_BUFSZ; | ||
1507 | size = nlists * sizeof(xfs_ext_irec_t); | ||
1508 | ASSERT(ifp->if_real_bytes); | 1503 | ASSERT(ifp->if_real_bytes); |
1509 | ASSERT((new_size >= 0) && (new_size != size)); | 1504 | ASSERT((new_size >= 0) && |
1505 | (new_size != ((ifp->if_real_bytes / XFS_IEXT_BUFSZ) * | ||
1506 | sizeof(xfs_ext_irec_t)))); | ||
1510 | if (new_size == 0) { | 1507 | if (new_size == 0) { |
1511 | xfs_iext_destroy(ifp); | 1508 | xfs_iext_destroy(ifp); |
1512 | } else { | 1509 | } else { |
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index ef2c1375f092..e0a0af0946f2 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c | |||
@@ -570,7 +570,9 @@ xfs_buf_item_unlock( | |||
570 | bool aborted = !!(lip->li_flags & XFS_LI_ABORTED); | 570 | bool aborted = !!(lip->li_flags & XFS_LI_ABORTED); |
571 | bool hold = !!(bip->bli_flags & XFS_BLI_HOLD); | 571 | bool hold = !!(bip->bli_flags & XFS_BLI_HOLD); |
572 | bool dirty = !!(bip->bli_flags & XFS_BLI_DIRTY); | 572 | bool dirty = !!(bip->bli_flags & XFS_BLI_DIRTY); |
573 | #if defined(DEBUG) || defined(XFS_WARN) | ||
573 | bool ordered = !!(bip->bli_flags & XFS_BLI_ORDERED); | 574 | bool ordered = !!(bip->bli_flags & XFS_BLI_ORDERED); |
575 | #endif | ||
574 | 576 | ||
575 | /* Clear the buffer's association with this transaction. */ | 577 | /* Clear the buffer's association with this transaction. */ |
576 | bp->b_transp = NULL; | 578 | bp->b_transp = NULL; |
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 469c9fa4c178..17081c77ef86 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c | |||
@@ -817,7 +817,7 @@ xfs_vn_setattr_nonsize( | |||
817 | * Caution: The caller of this function is responsible for calling | 817 | * Caution: The caller of this function is responsible for calling |
818 | * setattr_prepare() or otherwise verifying the change is fine. | 818 | * setattr_prepare() or otherwise verifying the change is fine. |
819 | */ | 819 | */ |
820 | int | 820 | STATIC int |
821 | xfs_setattr_size( | 821 | xfs_setattr_size( |
822 | struct xfs_inode *ip, | 822 | struct xfs_inode *ip, |
823 | struct iattr *iattr) | 823 | struct iattr *iattr) |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index a36239980cf7..ee34899396b2 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -4827,12 +4827,16 @@ xlog_recover_process_intents( | |||
4827 | int error = 0; | 4827 | int error = 0; |
4828 | struct xfs_ail_cursor cur; | 4828 | struct xfs_ail_cursor cur; |
4829 | struct xfs_ail *ailp; | 4829 | struct xfs_ail *ailp; |
4830 | #if defined(DEBUG) || defined(XFS_WARN) | ||
4830 | xfs_lsn_t last_lsn; | 4831 | xfs_lsn_t last_lsn; |
4832 | #endif | ||
4831 | 4833 | ||
4832 | ailp = log->l_ailp; | 4834 | ailp = log->l_ailp; |
4833 | spin_lock(&ailp->xa_lock); | 4835 | spin_lock(&ailp->xa_lock); |
4834 | lip = xfs_trans_ail_cursor_first(ailp, &cur, 0); | 4836 | lip = xfs_trans_ail_cursor_first(ailp, &cur, 0); |
4837 | #if defined(DEBUG) || defined(XFS_WARN) | ||
4835 | last_lsn = xlog_assign_lsn(log->l_curr_cycle, log->l_curr_block); | 4838 | last_lsn = xlog_assign_lsn(log->l_curr_cycle, log->l_curr_block); |
4839 | #endif | ||
4836 | while (lip != NULL) { | 4840 | while (lip != NULL) { |
4837 | /* | 4841 | /* |
4838 | * We're done when we see something other than an intent. | 4842 | * We're done when we see something other than an intent. |