Skip to content

Commit

Permalink
xfs: remove XBF_STALE flag wrapper macros
Browse files Browse the repository at this point in the history
They only set/clear/check a flag, no need for obfuscating this
with a macro.

Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
  • Loading branch information
Dave Chinner authored and dchinner committed Feb 10, 2016
1 parent b68c082 commit 5cfd28b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions fs/xfs/xfs_buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ extern void xfs_buf_iomove(xfs_buf_t *, size_t, size_t, void *,

/* Buffer Utility Routines */
extern void *xfs_buf_offset(struct xfs_buf *, size_t);
extern void xfs_buf_stale(struct xfs_buf *bp);

/* Delayed Write Buffer Routines */
extern bool xfs_buf_delwri_queue(struct xfs_buf *, struct list_head *);
Expand All @@ -317,9 +318,6 @@ extern void xfs_buf_terminate(void);
XBF_SYNCIO|XBF_FUA|XBF_FLUSH| \
XBF_WRITE_FAIL))

void xfs_buf_stale(struct xfs_buf *bp);
#define XFS_BUF_UNSTALE(bp) ((bp)->b_flags &= ~XBF_STALE)
#define XFS_BUF_ISSTALE(bp) ((bp)->b_flags & XBF_STALE)

/*
* These macros use the IO block map rather than b_bn. b_bn is now really
Expand Down
2 changes: 1 addition & 1 deletion fs/xfs/xfs_buf_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ xfs_buf_item_unpin(
if (freed && stale) {
ASSERT(bip->bli_flags & XFS_BLI_STALE);
ASSERT(xfs_buf_islocked(bp));
ASSERT(XFS_BUF_ISSTALE(bp));
ASSERT(bp->b_flags & XBF_STALE);
ASSERT(bip->__bli_format.blf_flags & XFS_BLF_CANCEL);

trace_xfs_buf_item_unpin_stale(bip);
Expand Down
6 changes: 3 additions & 3 deletions fs/xfs/xfs_trans_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ xfs_trans_log_buf(xfs_trans_t *tp,
*/
if (bip->bli_flags & XFS_BLI_STALE) {
bip->bli_flags &= ~XFS_BLI_STALE;
ASSERT(XFS_BUF_ISSTALE(bp));
XFS_BUF_UNSTALE(bp);
ASSERT(bp->b_flags & XBF_STALE);
bp->b_flags &= ~XBF_STALE;
bip->__bli_format.blf_flags &= ~XFS_BLF_CANCEL;
}

Expand Down Expand Up @@ -600,7 +600,7 @@ xfs_trans_binval(
* If the buffer is already invalidated, then
* just return.
*/
ASSERT(XFS_BUF_ISSTALE(bp));
ASSERT(bp->b_flags & XBF_STALE);
ASSERT(!(bip->bli_flags & (XFS_BLI_LOGGED | XFS_BLI_DIRTY)));
ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_INODE_BUF));
ASSERT(!(bip->__bli_format.blf_flags & XFS_BLFT_MASK));
Expand Down

0 comments on commit 5cfd28b

Please sign in to comment.