diff options
author | Nikolay Borisov <nborisov@suse.com> | 2019-03-27 14:24:15 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 19:02:37 +0200 |
commit | e74e3993bcf6a1d119a2bbe7af2cc278a147f930 (patch) | |
tree | f7956a3b5b0013254f66b0d6723d2ce32300f782 /fs/btrfs/ctree.h | |
parent | 60dfdf25bd31b94d0ed8e0ea50964ff22cc36a87 (diff) | |
download | linux-e74e3993bcf6a1d119a2bbe7af2cc278a147f930.tar.gz linux-e74e3993bcf6a1d119a2bbe7af2cc278a147f930.tar.bz2 linux-e74e3993bcf6a1d119a2bbe7af2cc278a147f930.zip |
btrfs: Factor out in_range macro
This is used in more than one places so let's factor it out in ctree.h.
No functional changes.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 93270e20a8e7..1a6c5ce0cdac 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -3806,6 +3806,8 @@ 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_inode_set_ops(struct inode *inode); |