From: Eric Sandeen <sandeen@sandeen.net>
To: xfs mailing list <xfs@oss.sgi.com>
Subject: [PATCH] remove remaining useless if-before-frees
Date: Thu, 28 May 2009 13:22:25 -0500 [thread overview]
Message-ID: <4A1ED661.5020202@sandeen.net> (raw)
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
next reply other threads:[~2009-05-28 18:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 18:22 Eric Sandeen [this message]
2009-05-28 18:49 ` [PATCH] remove remaining useless if-before-frees Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A1ED661.5020202@sandeen.net \
--to=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.