Skip to contentSkip to conversation

ocfs2: Simplify the calculation of variables

PATCH Applied Jiapeng Chong 2 participants 2 messages Feb 2, 2021 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2: Simplify the calculation of variables

Fix the following coccicheck warnings:

./fs/ocfs2/refcounttree.c:981:16-18: WARNING !A || A && B is equivalent to !A || B.

---
 fs/ocfs2/refcounttree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/refcounttree.c +1 -1
index 3b397fa..115365e85 100644
@@ -978,7 +978,7 @@ static int ocfs2_get_refcount_cpos_end(struct ocfs2_caching_info *ci,
 		return 0;
 	}
 
-	if (!eb || (eb && !eb->h_next_leaf_blk)) {
+	if (!eb || !eb->h_next_leaf_blk) {
 		/*
 		 * We are the last extent rec, so any high cpos should
 		 * be stored in this leaf refcount block.
Signature · 1 line
1.8.3.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jiapeng Chong

Fix the following coccicheck warnings:

./fs/ocfs2/refcounttree.c:981:16-18: WARNING !A || A && B is equivalent to !A || B.

Quoted 10 lines
---
 fs/ocfs2/refcounttree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/refcounttree.c +0 -0
index 3b397fa..115365e85 100644

fs/ocfs2/refcounttree.c static int ocfs2_get_refcount_cpos_end(struct ocfs2_caching_info *ci, · line 984

Quoted 8 lines
fs/ocfs2/refcounttree.c +1 -1
@@ -978,7 +978,7 @@ static int ocfs2_get_refcount_cpos_end(struct ocfs2_caching_info *ci,
 		return 0;
 	}
 
-	if (!eb || (eb && !eb->h_next_leaf_blk)) {
+	if (!eb || !eb->h_next_leaf_blk) {
 		/*
 		 * We are the last extent rec, so any high cpos should
 		 * be stored in this leaf refcount block.

_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel