[jffs2] Fixup symlink.c for linux 2.6.13 [From: Peter Grayson ] diff -uNr mtd/fs/jffs2/symlink.c mtd-jffs2-symlink/fs/jffs2/symlink.c --- mtd/fs/jffs2/symlink.c 2005-08-30 15:47:52.000000000 -0600 +++ mtd-jffs2-symlink/fs/jffs2/symlink.c 2005-09-30 17:41:48.164336152 -0600 @@ -18,19 +18,19 @@ #include #include "nodelist.h" -static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd); +static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd); struct inode_operations jffs2_symlink_inode_operations = -{ +{ .readlink = generic_readlink, .follow_link = jffs2_follow_link, .setattr = jffs2_setattr }; -static int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd) +static void *jffs2_follow_link(struct dentry *dentry, struct nameidata *nd) { struct jffs2_inode_info *f = JFFS2_INODE_INFO(dentry->d_inode); - + /* * We don't acquire the f->sem mutex here since the only data we * use is f->target. @@ -43,20 +43,20 @@ * stopped using our f->target string which we provide by means of * nd_set_link() call. */ - + if (!f->target) { - printk(KERN_ERR "jffs2_follow_link(): can't find symlink taerget\n"); - return -EIO; + printk(KERN_ERR "jffs2_follow_link(): can't find symlink target\n"); + return ERR_PTR(-EIO); } D1(printk(KERN_DEBUG "jffs2_follow_link(): target path is '%s'\n", (char *) f->target)); nd_set_link(nd, (char *)f->target); - + /* * We will unlock the f->sem mutex but VFS will use the f->target string. This is safe * since the only way that may cause f->target to be changed is iput() operation. * But VFS will not use f->target after iput() has been called. */ - return 0; + return NULL; }