diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-01-26 23:50:41 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2017-01-26 23:50:41 +0300 |
commit | ee6625a948d2e47267ec8fd97307fdd67d0f8a5b (patch) | |
tree | b12ad012131b8fee01e663da1cc9937e2af16851 /fs/nfs/pnfs.c | |
parent | 406dab8450ec76eca88a1af2fc15d18a2b36ca49 (diff) | |
download | linux-ee6625a948d2e47267ec8fd97307fdd67d0f8a5b.tar.xz |
pNFS: Fix a reference leak in _pnfs_return_layout
IF NFS_LAYOUT_RETURN_REQUESTED is not set, then we currently exit
without freeing the list of invalidated layout segments, leading
to a reference leak.
Reported-by: Olga Kornievskaia <aglo@umich.edu>
Fixes: 24408f5282 ("pNFS: Fix bugs in _pnfs_return_layout")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r-- | fs/nfs/pnfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 59554f3adf29..dd042498ce7c 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1200,10 +1200,10 @@ _pnfs_return_layout(struct inode *ino) send = pnfs_prepare_layoutreturn(lo, &stateid, NULL); spin_unlock(&ino->i_lock); - pnfs_free_lseg_list(&tmp_list); if (send) status = pnfs_send_layoutreturn(lo, &stateid, IOMODE_ANY, true); out_put_layout_hdr: + pnfs_free_lseg_list(&tmp_list); pnfs_put_layout_hdr(lo); out: dprintk("<-- %s status: %d\n", __func__, status); |