summaryrefslogtreecommitdiff
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-04-27 14:31:47 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-04-27 15:03:51 -0400
commit9b5415b536cc3193e9608a7fced1372df8ce4dcf (patch)
tree02d031861e7fa008d02bb74f46f480aed521f445 /fs/nfs/write.c
parent80a16b21a81eb639f0b726549f4c46c0e9aff92e (diff)
downloadlinux-3.10-9b5415b536cc3193e9608a7fced1372df8ce4dcf.tar.gz
linux-3.10-9b5415b536cc3193e9608a7fced1372df8ce4dcf.tar.bz2
linux-3.10-9b5415b536cc3193e9608a7fced1372df8ce4dcf.zip
NFS: Fix a use-before-initialised warning in fs/nfs/write.c and fs/nfs/pnfs.c
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>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index fec214bfa70..3636191c399 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1164,7 +1164,7 @@ static int nfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc)
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;