Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
return err;
}
-static void *wrapfs_follow_link(struct dentry *dentry, struct nameidata *nd)
+static const char *wrapfs_follow_link(struct dentry *dentry, void **cookie)
{
char *buf;
int len = PAGE_SIZE, err;
buf = kmalloc(len, GFP_KERNEL);
if (!buf) {
buf = ERR_PTR(-ENOMEM);
- goto out;
+ return buf;
}
/* read the symlink, and then we will follow it */
} else {
buf[err] = '\0';
}
-out:
- nd_set_link(nd, buf);
- return NULL;
+ return *cookie = buf;
}
static int wrapfs_permission(struct inode *inode, int mask)