Commit fa020a2b authored by Andrew Morton's avatar Andrew Morton
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1945,7 +1945,7 @@ static int shmem_getpage_gfp(struct inode *inode, pgoff_t index,

	spin_lock_irq(&info->lock);
	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);
	spin_unlock_irq(&info->lock);
	alloced = true;