Skip to content

Commit

Permalink
ext4: convert to DIV_ROUND_UP() in mpage_process_page_bufs()
Browse files Browse the repository at this point in the history
Just for better readability, no code logic change.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
  • Loading branch information
bbkzz authored and intel-lab-lkp committed Mar 10, 2023
1 parent b2e40d3 commit f4d2db5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/ext4/inode.c
Expand Up @@ -2218,8 +2218,7 @@ static int mpage_process_page_bufs(struct mpage_da_data *mpd,
{
struct inode *inode = mpd->inode;
int err;
ext4_lblk_t blocks = (i_size_read(inode) + i_blocksize(inode) - 1)
>> inode->i_blkbits;
ext4_lblk_t blocks = DIV_ROUND_UP(i_size_read(inode), i_blocksize(inode));

if (ext4_verity_in_progress(inode))
blocks = EXT_MAX_BLOCKS;
Expand Down

0 comments on commit f4d2db5

Please sign in to comment.