mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 16:53:58 -05:00
Btrfs: code cleanup min/max -> min_t/max_t
This cleans up the cases where the min/max macros were used with a cast rather than using directly min_t/max_t. Signed-off-by: Seraphime Kirkovski <kirkseraph@gmail.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
6b4df8b6c5
commit
50d0446e68
2 changed files with 3 additions and 3 deletions
|
@ -856,8 +856,8 @@ insert:
|
|||
tmp = min(tmp, (next_offset - file_key.offset) >>
|
||||
fs_info->sb->s_blocksize_bits);
|
||||
|
||||
tmp = max((u64)1, tmp);
|
||||
tmp = min(tmp, (u64)MAX_CSUM_ITEMS(fs_info, csum_size));
|
||||
tmp = max_t(u64, 1, tmp);
|
||||
tmp = min_t(u64, tmp, MAX_CSUM_ITEMS(fs_info, csum_size));
|
||||
ins_size = csum_size * tmp;
|
||||
} else {
|
||||
ins_size = csum_size;
|
||||
|
|
|
@ -395,7 +395,7 @@ static noinline int btrfs_ioctl_fitrim(struct file *file, void __user *arg)
|
|||
q = bdev_get_queue(device->bdev);
|
||||
if (blk_queue_discard(q)) {
|
||||
num_devices++;
|
||||
minlen = min((u64)q->limits.discard_granularity,
|
||||
minlen = min_t(u64, q->limits.discard_granularity,
|
||||
minlen);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue