Skip to content

Commit

Permalink
xfs: fix warning in xfs_finish_page_writeback for non-debug builds
Browse files Browse the repository at this point in the history
blockmask is unused if ASSERTs are disabled.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Christoph Hellwig authored and Dave Chinner committed May 20, 2016
1 parent 0e51a8e commit 690a787
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fs/xfs/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,14 @@ xfs_finish_page_writeback(
struct bio_vec *bvec,
int error)
{
unsigned int blockmask = (1 << inode->i_blkbits) - 1;
unsigned int end = bvec->bv_offset + bvec->bv_len - 1;
struct buffer_head *head, *bh;
unsigned int off = 0;

ASSERT(bvec->bv_offset < PAGE_SIZE);
ASSERT((bvec->bv_offset & blockmask) == 0);
ASSERT((bvec->bv_offset & ((1 << inode->i_blkbits) - 1)) == 0);
ASSERT(end < PAGE_SIZE);
ASSERT((bvec->bv_len & blockmask) == 0);
ASSERT((bvec->bv_len & ((1 << inode->i_blkbits) - 1)) == 0);

bh = head = page_buffers(bvec->bv_page);

Expand Down

0 comments on commit 690a787

Please sign in to comment.