btrfs: remove duplicated in_range() macro
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Tue, 16 Mar 2021 10:04:01 +0000 (19:04 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:16 +0000 (17:25 +0200)
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: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/extent_io.c
fs/btrfs/file-item.c
fs/btrfs/raid56.c

index 751ab9f80e4ccf13339c3cbeca0b6aadc06f1a68..1c18b4360df9a52ae3e513ae3ae44f2a08bb51ea 100644 (file)
@@ -3733,8 +3733,6 @@ static inline int btrfs_defrag_cancelled(struct btrfs_fs_info *fs_info)
        return signal_pending(current);
 }
 
-#define in_range(b, first, len) ((b) >= (first) && (b) < (first) + (len))
-
 /* Sanity test specific functions */
 #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
 void btrfs_test_destroy_inode(struct inode *inode);
index 8a9682d3232a18c56df30c82c33d5ee7179667bb..7ad2169e74872865f0009925aa65a0525dd62eb3 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/pagevec.h>
 #include <linux/prefetch.h>
 #include <linux/cleancache.h>
+#include "misc.h"
 #include "extent_io.h"
 #include "extent-io-tree.h"
 #include "extent_map.h"
index 47cd3a6dc6351b4bf692e1819fc6f812e1773306..294602f139efa624dec02be6d06448ce1865ece9 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/highmem.h>
 #include <linux/sched/mm.h>
 #include <crypto/hash.h>
+#include "misc.h"
 #include "ctree.h"
 #include "disk-io.h"
 #include "transaction.h"
index 8c31357f08ed9eb91784db8e468b3b5f49037e34..0a2858609bb7cee58415948263f2f76d386b22d4 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/list_sort.h>
 #include <linux/raid/xor.h>
 #include <linux/mm.h>
+#include "misc.h"
 #include "ctree.h"
 #include "disk-io.h"
 #include "volumes.h"