Skip to content
Permalink
Browse files
ext4: use min() to make code cleaner
Use min() in order to make code cleaner.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
  • Loading branch information
Changcheng Deng authored and intel-lab-lkp committed Dec 16, 2021
1 parent ba2e524 commit ff519f2d7d41c154cb0d31a9aebe16ce1f6af7ed
Showing 1 changed file with 1 addition and 2 deletions.
@@ -6923,8 +6923,7 @@ static ssize_t ext4_quota_read(struct super_block *sb, int type, char *data,
len = i_size-off;
toread = len;
while (toread > 0) {
tocopy = sb->s_blocksize - offset < toread ?
sb->s_blocksize - offset : toread;
tocopy = min(sb->s_blocksize - offset, toread);
bh = ext4_bread(NULL, inode, blk, 0);
if (IS_ERR(bh))
return PTR_ERR(bh);

0 comments on commit ff519f2

Please sign in to comment.