* [PATCH] remove remaining useless if-before-frees
@ 2009-05-28 18:22 Eric Sandeen
2009-05-28 18:49 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2009-05-28 18:22 UTC (permalink / raw)
To: xfs mailing list
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
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
Index: linux-2.6/fs/xfs/xfs_da_btree.c
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_da_btree.c
+++ 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);
}
Index: linux-2.6/fs/xfs/xfs_mount.c
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_mount.c
+++ 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
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] remove remaining useless if-before-frees
2009-05-28 18:22 [PATCH] remove remaining useless if-before-frees Eric Sandeen
@ 2009-05-28 18:49 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2009-05-28 18:49 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs mailing list
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-28 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-28 18:22 [PATCH] remove remaining useless if-before-frees Eric Sandeen
2009-05-28 18:49 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox