[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <558D1833.3080009@users.sourceforge.net>
Date: Fri, 26 Jun 2015 11:15:31 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Dave Chinner <david@...morbit.com>, xfs@....sgi.com
CC: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH] XFS: Delete unnecessary checks before the function call "xfs_qm_dqrele"
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 26 Jun 2015 11:05:41 +0200
The xfs_qm_dqrele() function tests whether its argument is NULL and
then returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
fs/xfs/xfs_qm_syscalls.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
index 3640c6e..6deee1e 100644
--- a/fs/xfs/xfs_qm_syscalls.c
+++ b/fs/xfs/xfs_qm_syscalls.c
@@ -735,15 +735,15 @@ xfs_dqrele_inode(
}
xfs_ilock(ip, XFS_ILOCK_EXCL);
- if ((flags & XFS_UQUOTA_ACCT) && ip->i_udquot) {
+ if (flags & XFS_UQUOTA_ACCT) {
xfs_qm_dqrele(ip->i_udquot);
ip->i_udquot = NULL;
}
- if ((flags & XFS_GQUOTA_ACCT) && ip->i_gdquot) {
+ if (flags & XFS_GQUOTA_ACCT) {
xfs_qm_dqrele(ip->i_gdquot);
ip->i_gdquot = NULL;
}
- if ((flags & XFS_PQUOTA_ACCT) && ip->i_pdquot) {
+ if (flags & XFS_PQUOTA_ACCT) {
xfs_qm_dqrele(ip->i_pdquot);
ip->i_pdquot = NULL;
}
--
2.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists