* [PATCH] fs: namei: Remove unnecessary check for NULL before iput()
@ 2014-05-26 9:31 Tobias Klauser
0 siblings, 0 replies; only message in thread
From: Tobias Klauser @ 2014-05-26 9:31 UTC (permalink / raw)
To: Alexander Viro; +Cc: linux-fsdevel, kernel-janitors
iput() already checks for the inode being NULL, thus it's unnecessary to
check before calling.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
fs/namei.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c
index 3220693..7be7cc2 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -3741,8 +3741,7 @@ exit2:
dput(dentry);
}
mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
- if (inode)
- iput(inode); /* truncate the inode here */
+ iput(inode); /* truncate the inode here */
inode = NULL;
if (delegated_inode) {
error = break_deleg_wait(&delegated_inode);
--
1.7.9.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-26 9:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 9:31 [PATCH] fs: namei: Remove unnecessary check for NULL before iput() Tobias Klauser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).