If the allocation of nfs_write_header fails, the list of nfs_pages that
needs to be cleaned up is still on desc->pg_list...
Reported-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: Fred Isaman <iisaman@netapp.com>
whdr = nfs_writehdr_alloc();
if (!whdr) {
- desc->pg_completion_ops->error_cleanup(&hdr->pages);
+ desc->pg_completion_ops->error_cleanup(&desc->pg_list);
put_lseg(desc->pg_lseg);
desc->pg_lseg = NULL;
return -ENOMEM;
whdr = nfs_writehdr_alloc();
if (!whdr) {
- desc->pg_completion_ops->error_cleanup(&hdr->pages);
+ desc->pg_completion_ops->error_cleanup(&desc->pg_list);
return -ENOMEM;
}
hdr = &whdr->header;