소스 검색

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>
Christoph Hellwig 9 년 전
부모
커밋
690a787122
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      fs/xfs/xfs_aops.c

+ 2 - 3
fs/xfs/xfs_aops.c

@@ -94,15 +94,14 @@ xfs_finish_page_writeback(
 	struct bio_vec		*bvec,
 	struct bio_vec		*bvec,
 	int			error)
 	int			error)
 {
 {
-	unsigned int		blockmask = (1 << inode->i_blkbits) - 1;
 	unsigned int		end = bvec->bv_offset + bvec->bv_len - 1;
 	unsigned int		end = bvec->bv_offset + bvec->bv_len - 1;
 	struct buffer_head	*head, *bh;
 	struct buffer_head	*head, *bh;
 	unsigned int		off = 0;
 	unsigned int		off = 0;
 
 
 	ASSERT(bvec->bv_offset < PAGE_SIZE);
 	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(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);
 	bh = head = page_buffers(bvec->bv_page);