* [PATCH] ocfs2: dlmglue: remove redundant check of null tmp_oh
@ 2018-07-31 12:53 Colin King
0 siblings, 0 replies; only message in thread
From: Colin King @ 2018-07-31 12:53 UTC (permalink / raw)
To: Mark Fasheh, Joel Becker, ocfs2-devel; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
A null tmp_oh is already being checked earlier and always leads to
an early return. Thus the check for a null tmp_oh at the end of
function ocfs2_inode_lock_tracker is redundant and can be replaced
with a return 1 instead.
Detected by CoverityScan, CID#1468855 ("Logically dead code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
fs/ocfs2/dlmglue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 040ddb6e7dab..5f85ce03ca7f 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -2695,7 +2695,7 @@ int ocfs2_inode_lock_tracker(struct inode *inode,
return status;
}
}
- return tmp_oh ? 1 : 0;
+ return 1;
}
void ocfs2_inode_unlock_tracker(struct inode *inode,
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-07-31 12:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-31 12:53 [PATCH] ocfs2: dlmglue: remove redundant check of null tmp_oh Colin King
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).