Hi Matthew,
Le 18/11/2021 à 22:50, Matthew Wilcox a écrit :
On Thu, Nov 18, 2021 at 10:28:28PM +0100, Christophe Vu-Brugier wrote:
inode->i_blocks = ((i_size_read(inode) + (sbi->cluster_size - 1)) &
- ~(sbi->cluster_size - 1)) >> inode->i_blkbits;
+ ~((loff_t)sbi->cluster_size - 1)) >> inode->i_blkbits;
Isn't this a convoluted way to write:
inode->i_blocks = round_up(i_size_read(inode), sbi->cluster_size) >>
inode->i_blkbits;
?
Yes, it is. And we have evidence that it is more error prone.
I will update my patch with what you suggest.
Thanks!
--
Christophe Vu-Brugier