[patch] afs: passing an ERR_PTR() to page_cache_release()
Dan Carpenter
error27 at gmail.com
Wed Apr 21 06:32:50 EDT 2010
In the error handling we try to release "page" if it's not NULL.
Signed-off-by: Dan Carpenter <error27 at 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;
}
More information about the linux-afs
mailing list