ocfs2: remove an unnecessary condition
Subsystems (2)
PATCH 1/1 ocfs2: remove an unnecessary condition
The case where "tmp_oh" is NULL is handled at the start of the function. At this point we know it's non-NULL so this will always return 1.
Signed-off-by Dan Carpenter <[email protected]>
--- fs/ocfs2/dlmglue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/dlmglue.c +1 -1
@@ -2721,7 +2721,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,
Signature · 1 line
2.30.2
Quoted 4 lines · Dan Carpenter
The case where "
tmp_oh" is NULL is handled at the start of the function. At this point we know it's non-NULL so this will always return 1.Signed-off-by Dan Carpenter <[email protected]>
Reviewed-by Joseph Qi <[email protected]>
Quoted 18 lines
--- fs/ocfs2/dlmglue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ocfs2/dlmglue.c +1
-1@@ -2721,7 +2721,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,