提交 c2ccc084 编写于 作者: C Chuck Lever 提交者: Trond Myklebust

NFS: nfs41_walk_client_list(): re-lock before iterating

Sparse identified an execution path in nfs41_walk_client_list()
where the nfs_client_lock is not re-acquired before taking the next
loop iteration.

fs/nfs/nfs4client.c:437:9: sparse: context imbalance in
 'nfs41_walk_client_list' - different lock contexts for basic block
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 ee314c2a
......@@ -450,6 +450,7 @@ int nfs41_walk_client_list(struct nfs_client *new,
error = nfs_wait_client_init_complete(pos);
if (error < 0) {
nfs_put_client(pos);
spin_lock(&nn->nfs_client_lock);
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册