btrfs: use min() to replace open-code in btrfs_invalidatepage()
authorQu Wenruo <wqu@suse.com>
Thu, 25 Mar 2021 07:14:34 +0000 (15:14 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:18 +0000 (17:25 +0200)
commitac5804eb8521bea5c1ec1b7e07ad87c469bf7437
treed724a87088d37af25f1dfde415e3c7453be53363
parentfc57ad8d338cbe78c3f7565f3c0812938835fad8
btrfs: use min() to replace open-code in btrfs_invalidatepage()

In btrfs_invalidatepage() we introduce a temporary variable, new_len, to
update ordered->truncated_len.  But we can use min() to replace it
completely and no need for the variable.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c