Commit fa020a2b authored by Andrew Morton's avatar Andrew Morton Committed by akpm

mm/shmem.c: suppress shift warning

mm/shmem.c:1948 shmem_getpage_gfp() warn: should '(((1) << 12) / 512) << folio_order(folio)' be a 64 bit type?

On i386, so an unsigned long is 32-bit, but i_blocks is a 64-bit blkcnt_t.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarJessica Clarke <jrtc27@jrtc27.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 0710d012
...@@ -1945,7 +1945,7 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index, ...@@ -1945,7 +1945,7 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index,
spin_lock_irq(&info->lock); spin_lock_irq(&info->lock);
info->alloced += folio_nr_pages(folio); info->alloced += folio_nr_pages(folio);
inode->i_blocks += BLOCKS_PER_PAGE << folio_order(folio); inode->i_blocks += (blkcnt_t)BLOCKS_PER_PAGE << folio_order(folio);
shmem_recalc_inode(inode); shmem_recalc_inode(inode);
spin_unlock_irq(&info->lock); spin_unlock_irq(&info->lock);
alloced = true; alloced = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment