Commit cf260db4 authored by Zhen Lei's avatar Zhen Lei Committed by Al Viro
Browse files

btrfs: replace INT_LIMIT(loff_t) with OFFSET_MAX



OFFSET_MAX is self-annotated and more readable.

Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
Acked-by: default avatarDavid Sterba <dsterba@suse.com>
Reviewed-by: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent cda2ed05
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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