Message ID | 1612235424-80367-1-git-send-email-jiapeng.chong@linux.alibaba.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ocfs2: Simplify the calculation of variables | expand |
On 2/2/21 11:10 AM, Jiapeng Chong wrote: > Fix the following coccicheck warnings: > > ./fs/ocfs2/refcounttree.c:981:16-18: WARNING !A || A && B is equivalent > to !A || B. > > Reported-by: Abaci Robot <abaci@linux.alibaba.com> > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> > --- > fs/ocfs2/refcounttree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c > index 3b397fa..115365e85 100644 > --- a/fs/ocfs2/refcounttree.c > +++ b/fs/ocfs2/refcounttree.c > @@ -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. >
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 3b397fa..115365e85 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c @@ -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.
Fix the following coccicheck warnings: ./fs/ocfs2/refcounttree.c:981:16-18: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> --- fs/ocfs2/refcounttree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)