Message ID | tencent_BE7385B955ECDB98FDC9D0B5C3F18E303709@qq.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | kernel bug found and suggestions for fixing it | expand |
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c @@ -2681,6 +2681,10 @@ struct ocfs2_refcount_block *rb; struct ocfs2_refcount_tree *tree; + // Check whether the node is valid + if (!ocfs2_refcount_tree_valid(tree)) + return -EINVAL; + while (p_cluster + clusters < end_cluster) { // Computational logic }