From d2cd610c5317f03242fba6aa47b00833f68d2e8f Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 21 Jul 2025 18:02:40 -0400 Subject: [PATCH] Fix return of uninit value. The value of `ret` is not initialized. If the writeback list is empty, or, if igrab() fails on the only inode on the list, the value of `ret` is returned without being initialized. This would cause the caller to needlessly have to retry, perhaps possibly make things worse. Signed-off-by: Auke Kok --- kmod/src/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/src/inode.c b/kmod/src/inode.c index e1ac0e3e..cd6f37bc 100644 --- a/kmod/src/inode.c +++ b/kmod/src/inode.c @@ -2188,7 +2188,7 @@ int scoutfs_inode_walk_writeback(struct super_block *sb, bool write) struct scoutfs_inode_info *si; struct scoutfs_inode_info *tmp; struct inode *inode; - int ret; + int ret = 0; spin_lock(&inf->writeback_lock);