summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorWeston Andros Adamson <dros@monkey.org>2017-08-01 16:25:01 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-16 13:43:17 -0700
commit00f3c2a253f752948c5cac9f3a554407ab43d9c2 (patch)
tree2e5c33d29ba726f5b29b6d63fceb580e3c5eb9b4 /fs/nfs
parent0a205d8145c22d83e24ada019b599a33f7bf68ed (diff)
nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays
commit 1feb26162bee7b2f110facfec71b5c7bdbc7d14d upstream. The client was freeing the nfs4_ff_layout_ds, but not the contained nfs4_ff_ds_version array. Signed-off-by: Weston Andros Adamson <dros@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayoutdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index f7a3f6b05369..90099896b838 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -30,6 +30,7 @@ void nfs4_ff_layout_free_deviceid(struct nfs4_ff_layout_ds *mirror_ds)
{
nfs4_print_deviceid(&mirror_ds->id_node.deviceid);
nfs4_pnfs_ds_put(mirror_ds->ds);
+ kfree(mirror_ds->ds_versions);
kfree_rcu(mirror_ds, id_node.rcu);
}