]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: replace INT_LIMIT(loff_t) with OFFSET_MAX
authorZhen Lei <thunder.leizhen@huawei.com>
Fri, 25 Nov 2022 09:13:57 +0000 (17:13 +0800)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 25 Nov 2022 20:43:35 +0000 (15:43 -0500)
OFFSET_MAX is self-annotated and more readable.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Acked-by: David Sterba <dsterba@suse.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/btrfs/ordered-data.c

index e54f8280031fa14e29ae276e73b0eaf5b431cd3b..100d9f4836b177dc4599a3e7c5fe43e74b9e8be7 100644 (file)
@@ -761,11 +761,11 @@ int btrfs_wait_ordered_range(struct inode *inode, u64 start, u64 len)
        struct btrfs_ordered_extent *ordered;
 
        if (start + len < start) {
-               orig_end = INT_LIMIT(loff_t);
+               orig_end = OFFSET_MAX;
        } else {
                orig_end = start + len - 1;
-               if (orig_end > INT_LIMIT(loff_t))
-                       orig_end = INT_LIMIT(loff_t);
+               if (orig_end > OFFSET_MAX)
+                       orig_end = OFFSET_MAX;
        }
 
        /* start IO across the range first to instantiate any delalloc