xfs
[Top] [All Lists]

[PATCH] xfs: fix warning in xfs_finish_page_writeback for non-debug buil

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfs: fix warning in xfs_finish_page_writeback for non-debug builds
From: Christoph Hellwig <hch@xxxxxx>
Date: Thu, 7 Apr 2016 08:44:51 -0700
Delivered-to: xfs@xxxxxxxxxxx
blockmask is unused if ASSERTs are disabled.

Reported-by: kbuild test robot <fengguang.wu@xxxxxxxxx>
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 fs/xfs/xfs_aops.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 40645a4..1d6eca5 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -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);
 
-- 
2.1.4

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] xfs: fix warning in xfs_finish_page_writeback for non-debug builds, Christoph Hellwig <=