lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251128174804.293605-1-mpellizzer.dev@gmail.com>
Date: Fri, 28 Nov 2025 17:47:55 +0000
From: Massimiliano Pellizzer <mpellizzer.dev@...il.com>
To: clm@...com,
	dsterba@...e.com
Cc: linux-btrfs@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Massimiliano Pellizzer <mpellizzer.dev@...il.com>
Subject: [PATCH] btrfs: remove dead assignment in prepare_one_folio()

In the error path of prepare_one_folio(), we assign ret = 0
before jumping to the again label to retry the operation.
However, ret is immediately overwritten by
ret = set_folio_extent_mapped(folio).

The zero assignment is never observerd by any code path,
therefore it can be safely removed.

No functional change.

Signed-off-by: Massimiliano Pellizzer <mpellizzer.dev@...il.com>
---
 fs/btrfs/file.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 7a501e73d880..7d875aa261d1 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -877,7 +877,6 @@ static noinline int prepare_one_folio(struct inode *inode, struct folio **folio_
 		/* The folio is already unlocked. */
 		folio_put(folio);
 		if (!nowait && ret == -EAGAIN) {
-			ret = 0;
 			goto again;
 		}
 		return ret;
-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ