提交 df011748 编写于 作者: F Fred Isaman 提交者: Trond Myklebust

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: NFred Isaman <iisaman@netapp.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 1763da12
......@@ -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 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册