Fix nasty ncpfs symlink handling bug.
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / sysfs / symlink.c
index fae57c83a722f4e782a2651e7dc0b74a66dfee76..de402fa915f2778e010d20bfeca2c6ebc05f6ddd 100644 (file)
@@ -151,17 +151,17 @@ static int sysfs_getlink(struct dentry *dentry, char * path)
 
 }
 
-static int sysfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        int error = -ENOMEM;
        unsigned long page = get_zeroed_page(GFP_KERNEL);
        if (page)
                error = sysfs_getlink(dentry, (char *) page); 
        nd_set_link(nd, error ? ERR_PTR(error) : (char *)page);
-       return 0;
+       return NULL;
 }
 
-static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd)
+static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
 {
        char *page = nd_get_link(nd);
        if (!IS_ERR(page))