Skip to contentSkip to conversation

ocfs2-remove-unnecessary-null-check-in-ocfs2_grab_folios.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Sep 14, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: ocfs2: remove unnecessary NULL check in ocfs2_grab_folios()
has been removed from the -mm tree. Its filename was
ocfs2-remove-unnecessary-null-check-in-ocfs2_grab_folios.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Dan Carpenter <[email protected]>
Subject: ocfs2: remove unnecessary NULL check in ocfs2_grab_folios()
Date: Tue, 19 Aug 2025 12:41:51 +0300

Smatch complains that checking "folios" for NULL doesn't make sense because it has already been dereferenced at this point. Really passing a NULL "folios" pointer to ocfs2_grab_folios() doesn't make sense, and fortunately none of the callers do that. Delete the unnecessary NULL check.

---

 fs/ocfs2/alloc.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/ocfs2/alloc.c renamed from fs/ocfs2/alloc.c~ocfs2-remove-unnecessary-null-check-in-ocfs2_grab_folios +1 -2
@@ -6928,8 +6928,7 @@ static int ocfs2_grab_folios(struct inod
 
 out:
 	if (ret != 0) {
-		if (folios)
-			ocfs2_unlock_and_free_folios(folios, numfolios);
+		ocfs2_unlock_and_free_folios(folios, numfolios);
 		numfolios = 0;
 	}
 

_

Patches currently in -mm which might be from [email protected] are