kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] afs: passing an ERR_PTR() to page_cache_release()
@ 2010-04-21 10:32 Dan Carpenter
  2010-04-21 10:54 ` David Howells
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-04-21 10:32 UTC (permalink / raw)
  To: kernel-janitors

In the error handling we try to release "page" if it's not NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c
index 5e813a8..f9b23a7 100644
--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -165,6 +165,7 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt)
 	page = read_mapping_page(mntpt->d_inode->i_mapping, 0, NULL);
 	if (IS_ERR(page)) {
 		ret = PTR_ERR(page);
+		page = NULL;
 		goto error;
 	}
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-21 10:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-21 10:32 [patch] afs: passing an ERR_PTR() to page_cache_release() Dan Carpenter
2010-04-21 10:54 ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).