btrfs: use PAGE_ALIGNED instead of open-coding it
[sfrench/cifs-2.6.git] / fs / btrfs / inode.c
index 2d8aacf072c00bc6248fe7f3a229d85b3cc028c6..3c71fcd402d004315737fb07aaa8afc019c6af0d 100644 (file)
@@ -2039,7 +2039,7 @@ int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end,
                              unsigned int extra_bits,
                              struct extent_state **cached_state, int dedupe)
 {
-       WARN_ON((end & (PAGE_SIZE - 1)) == 0);
+       WARN_ON(PAGE_ALIGNED(end));
        return set_extent_delalloc(&BTRFS_I(inode)->io_tree, start, end,
                                   extra_bits, cached_state);
 }