Commit cea62800 authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by David Sterba

btrfs: remove duplicated in_range() macro

The in_range() macro is defined twice in btrfs' source, once in ctree.h
and once in misc.h.

Remove the definition in ctree.h and include misc.h in the files depending
on it.
Signed-off-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 209ecbb8
...@@ -3733,8 +3733,6 @@ static inline int btrfs_defrag_cancelled(struct btrfs_fs_info *fs_info) ...@@ -3733,8 +3733,6 @@ static inline int btrfs_defrag_cancelled(struct btrfs_fs_info *fs_info)
return signal_pending(current); return signal_pending(current);
} }
#define in_range(b, first, len) ((b) >= (first) && (b) < (first) + (len))
/* Sanity test specific functions */ /* Sanity test specific functions */
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
void btrfs_test_destroy_inode(struct inode *inode); void btrfs_test_destroy_inode(struct inode *inode);
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/pagevec.h> #include <linux/pagevec.h>
#include <linux/prefetch.h> #include <linux/prefetch.h>
#include <linux/cleancache.h> #include <linux/cleancache.h>
#include "misc.h"
#include "extent_io.h" #include "extent_io.h"
#include "extent-io-tree.h" #include "extent-io-tree.h"
#include "extent_map.h" #include "extent_map.h"
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/sched/mm.h> #include <linux/sched/mm.h>
#include <crypto/hash.h> #include <crypto/hash.h>
#include "misc.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "transaction.h" #include "transaction.h"
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/list_sort.h> #include <linux/list_sort.h>
#include <linux/raid/xor.h> #include <linux/raid/xor.h>
#include <linux/mm.h> #include <linux/mm.h>
#include "misc.h"
#include "ctree.h" #include "ctree.h"
#include "disk-io.h" #include "disk-io.h"
#include "volumes.h" #include "volumes.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment