Skip to content

Commit

Permalink
NFS/pNFS: Fix a leak of the layout 'plh_outstanding' counter
Browse files Browse the repository at this point in the history
If we exit _lgopen_prepare_attached() without setting a layout, we will
currently leak the plh_outstanding counter.

Fixes: 411ae72 ("pNFS: Wait for stale layoutget calls to complete in pnfs_update_layout()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
Trond Myklebust committed Jan 10, 2021
1 parent 46c9ea1 commit cb2856c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfs/pnfs.c
Expand Up @@ -2244,6 +2244,7 @@ static void _lgopen_prepare_attached(struct nfs4_opendata *data,
&rng, GFP_KERNEL);
if (!lgp) {
pnfs_clear_first_layoutget(lo);
nfs_layoutget_end(lo);
pnfs_put_layout_hdr(lo);
return;
}
Expand Down

0 comments on commit cb2856c

Please sign in to comment.