Commit a89bd89f authored by Markus Elfring's avatar Markus Elfring Committed by Linus Torvalds

ocfs2: delete unnecessary checks before brelse()

brelse() tests whether its argument is NULL and then returns immediately.
Thus the tests around the shown calls are not needed.

This issue was detected by using the Coccinelle software.

Link: default avatarMarkus Elfring <>
Reviewed-by: default avatarJoseph Qi <>
Cc: Mark Fasheh <>
Cc: Joel Becker <>
Cc: Junxiao Bi <>
Cc: Changwei Ge <>
Cc: Gang He <>
Cc: Jun Piao <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 77461ba1
......@@ -2508,9 +2508,7 @@ int ocfs2_inode_lock_full_nested(struct inode *inode,
ocfs2_inode_unlock(inode, ex);
if (local_bh)
return status;
......@@ -2593,8 +2591,7 @@ int ocfs2_inode_lock_atime(struct inode *inode,
*level = 1;
if (ocfs2_should_update_atime(inode, vfsmnt))
ocfs2_update_inode_atime(inode, bh);
if (bh)
} else
*level = 0;
......@@ -590,8 +590,7 @@ int ocfs2_xattr_get_clusters(struct inode *inode, u32 v_cluster,
*extent_flags = rec->e_flags;
if (eb_bh)
return ret;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment