Re: [bug report] buffer: hoist GFP flags from grow_dev_page() to __getblk_gfp()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 27, 2023 at 10:40:21AM +0300, Dan Carpenter wrote:
> Hello Matthew Wilcox (Oracle),
> 
> The patch a3c38500d469: "buffer: hoist GFP flags from grow_dev_page()
> to __getblk_gfp()" from Sep 14, 2023 (linux-next), leads to the
> following Smatch static checker warning:
> 
> 	fs/buffer.c:1065 grow_dev_page()
> 	warn: NEW missing error code 'ret'

Andrew, please add this -fix patch to "buffer: hoist GFP flags from
grow_dev_page() to __getblk_gfp()".  I'll send a further cleanup patch
to make the return values a bit more meaningful.

diff --git a/fs/buffer.c b/fs/buffer.c
index 3fe293c9f3ca..b1610202eb5c 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1060,6 +1060,7 @@ grow_dev_page(struct block_device *bdev, sector_t block,
 			goto failed;
 	}
 
+	ret = -ENOMEM;
 	bh = folio_alloc_buffers(folio, size, gfp | __GFP_ACCOUNT);
 	if (!bh)
 		goto failed;



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux