You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
+1
-1
@@ -1200,10 +1200,10 @@ _pnfs_return_layout(struct inode *ino)
|
|||||||
|
|
||||||
send = pnfs_prepare_layoutreturn(lo, &stateid, NULL);
|
send = pnfs_prepare_layoutreturn(lo, &stateid, NULL);
|
||||||
spin_unlock(&ino->i_lock);
|
spin_unlock(&ino->i_lock);
|
||||||
pnfs_free_lseg_list(&tmp_list);
|
|
||||||
if (send)
|
if (send)
|
||||||
status = pnfs_send_layoutreturn(lo, &stateid, IOMODE_ANY, true);
|
status = pnfs_send_layoutreturn(lo, &stateid, IOMODE_ANY, true);
|
||||||
out_put_layout_hdr:
|
out_put_layout_hdr:
|
||||||
|
pnfs_free_lseg_list(&tmp_list);
|
||||||
pnfs_put_layout_hdr(lo);
|
pnfs_put_layout_hdr(lo);
|
||||||
out:
|
out:
|
||||||
dprintk("<-- %s status: %d\n", __func__, status);
|
dprintk("<-- %s status: %d\n", __func__, status);
|
||||||
|
|||||||
Reference in New Issue
Block a user