Thread (5 messages) 5 messages, 3 authors, 2022-05-26

Re: [linux-next:master] BUILD REGRESSION 8cb8311e95e3bb58bd84d6350365f14a718faa6d

flat view

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2022-05-25 22:20:11
Also in: alsa-devel, amd-gfx, bpf, dri-devel, kvm, linux-arm-kernel, linux-fbdev, linux-mm, linux-omap, linux-pci, linux-rdma, linux-riscv, linux-staging, netdev

On Wed, 25 May 2022 23:07:35 +0100 Jessica Clarke [off-list ref] wrote:
This is i386, so an unsigned long is 32-bit, but i_blocks is a blkcnt_t
i.e. a u64, which makes the shift without a cast of the LHS fishy.
Ah, of course, thanks.  I remember 32 bits ;)
--- a/mm/shmem.c~mm-shmemc-suppress-shift-warning
+++ a/mm/shmem.c
@@ -1945,7 +1945,7 @@ alloc_nohuge:
 
 	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;
_

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help