Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df011748 authored by Fred Isaman's avatar Fred Isaman Committed by Trond Myklebust
Browse files

NFS: Prevent garbage cinfo->ds from leaking out



This is a bugfix that applies on top of the previous directio patches,
that fixes a bug introduced in "NFS: create struct nfs_commit_info".

Signed-off-by: default avatarFred Isaman <iisaman@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 1763da12
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1184,7 +1184,12 @@ filelayout_free_layout_hdr(struct pnfs_layout_hdr *lo)
static struct pnfs_ds_commit_info *
filelayout_get_ds_info(struct inode *inode)
{
	return &FILELAYOUT_FROM_HDR(NFS_I(inode)->layout)->commit_info;
	struct pnfs_layout_hdr *layout = NFS_I(inode)->layout;

	if (layout == NULL)
		return NULL;
	else
		return &FILELAYOUT_FROM_HDR(layout)->commit_info;
}

static struct pnfs_layoutdriver_type filelayout_type = {