Skip to contentSkip to conversation

remove remaining useless if-before-frees

PATCH In review Eric Sandeen 2 participants 2 messages May 28, 2009 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove remaining useless if-before-frees

Just janitorial work, but this removes the last couple if-before-frees I could find in xfs with the tool from

http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/useless-if-before-free

---

fs/xfs/xfs_da_btree.c +1 -3
Index: linux-2.6/fs/xfs/xfs_da_btree.c
===================================================================
@@ -2116,9 +2116,7 @@ xfs_da_do_buf(
 			goto exit1;
 		}
 	}
-	if (bplist) {
-		kmem_free(bplist);
-	}
+	kmem_free(bplist);
 	if (mapp != &map) {
 		kmem_free(mapp);
 	}
fs/xfs/xfs_mount.c +1 -2
Index: linux-2.6/fs/xfs/xfs_mount.c
===================================================================
@@ -211,8 +211,7 @@ xfs_free_perag(
 		int	agno;
 
 		for (agno = 0; agno < mp->m_maxagi; agno++)
-			if (mp->m_perag[agno].pagb_list)
-				kmem_free(mp->m_perag[agno].pagb_list);
+			kmem_free(mp->m_perag[agno].pagb_list);
 		kmem_free(mp->m_perag);
 	}
 }

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs