提交 31534444 编写于 作者: T Trond Myklebust 提交者: Yang Yingliang

NFS/pNFS: Fix a leak of the layout 'plh_outstanding' counter

stable inclusion
from linux-4.19.169
commit b2f9fbbc3fa20f066e20f1d676175e4af0e177ba

--------------------------------

commit cb2856c5 upstream.

If we exit _lgopen_prepare_attached() without setting a layout, we will
currently leak the plh_outstanding counter.

Fixes: 411ae722 ("pNFS: Wait for stale layoutget calls to complete in pnfs_update_layout()")
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
上级 a9749824
...@@ -2138,6 +2138,7 @@ static void _lgopen_prepare_attached(struct nfs4_opendata *data, ...@@ -2138,6 +2138,7 @@ static void _lgopen_prepare_attached(struct nfs4_opendata *data,
&rng, GFP_KERNEL); &rng, GFP_KERNEL);
if (!lgp) { if (!lgp) {
pnfs_clear_first_layoutget(lo); pnfs_clear_first_layoutget(lo);
nfs_layoutget_end(lo);
pnfs_put_layout_hdr(lo); pnfs_put_layout_hdr(lo);
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册