diff options
author | Christoph Hellwig <hch@lst.de> | 2016-05-19 20:29:15 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-05-19 20:29:15 -0400 |
commit | 690a7871225b7f91f8fe13c465a79e183a61cfe3 (patch) | |
tree | 95a00b9016159369214982ee449f300768538503 | |
parent | 0e51a8e191dbd9b9c7b7bb0a1c28d57cd2be8e6a (diff) |
xfs: fix warning in xfs_finish_page_writeback for non-debug builds
blockmask is unused if ASSERTs are disabled.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | fs/xfs/xfs_aops.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index b5f1c66bbb58..736461a861b1 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c | |||
@@ -94,15 +94,14 @@ xfs_finish_page_writeback( | |||
94 | struct bio_vec *bvec, | 94 | struct bio_vec *bvec, |
95 | int error) | 95 | int error) |
96 | { | 96 | { |
97 | unsigned int blockmask = (1 << inode->i_blkbits) - 1; | ||
98 | unsigned int end = bvec->bv_offset + bvec->bv_len - 1; | 97 | unsigned int end = bvec->bv_offset + bvec->bv_len - 1; |
99 | struct buffer_head *head, *bh; | 98 | struct buffer_head *head, *bh; |
100 | unsigned int off = 0; | 99 | unsigned int off = 0; |
101 | 100 | ||
102 | ASSERT(bvec->bv_offset < PAGE_SIZE); | 101 | ASSERT(bvec->bv_offset < PAGE_SIZE); |
103 | ASSERT((bvec->bv_offset & blockmask) == 0); | 102 | ASSERT((bvec->bv_offset & ((1 << inode->i_blkbits) - 1)) == 0); |
104 | ASSERT(end < PAGE_SIZE); | 103 | ASSERT(end < PAGE_SIZE); |
105 | ASSERT((bvec->bv_len & blockmask) == 0); | 104 | ASSERT((bvec->bv_len & ((1 << inode->i_blkbits) - 1)) == 0); |
106 | 105 | ||
107 | bh = head = page_buffers(bvec->bv_page); | 106 | bh = head = page_buffers(bvec->bv_page); |
108 | 107 | ||