mtd/fs/jffs2 symlink-v24.c,1.15,1.16

Artem Bityuckiy dedekind at infradead.org
Fri Mar 4 05:43:22 EST 2005


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv9837

Modified Files:
	symlink-v24.c 
Log Message:
Adopt symlink patch to 2.4 kernels.


Index: symlink-v24.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/symlink-v24.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- symlink-v24.c	16 Nov 2004 20:36:12 -0000	1.15
+++ symlink-v24.c	4 Mar 2005 10:43:19 -0000	1.16
@@ -29,29 +29,20 @@
 
 int jffs2_readlink(struct dentry *dentry, char *buffer, int buflen)
 {
-	unsigned char *kbuf;
-	int ret;
+	if (!f->dents) {
+		printk(KERN_ERR "jffs2_readlink(): can't find symlink taerget\n");
+		return -EIO;
+	}
 
-	kbuf = jffs2_getlink(JFFS2_SB_INFO(dentry->d_inode->i_sb), JFFS2_INODE_INFO(dentry->d_inode));
-	if (IS_ERR(kbuf))
-		return PTR_ERR(kbuf);
-
-	ret = vfs_readlink(dentry, buffer, buflen, kbuf);
-	kfree(kbuf);
-	return ret;
+	return vfs_readlink(dentry, buffer, buflen, (char *)f->dents);
 }
 
 int jffs2_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
-	unsigned char *buf;
-	int ret;
-
-	buf = jffs2_getlink(JFFS2_SB_INFO(dentry->d_inode->i_sb), JFFS2_INODE_INFO(dentry->d_inode));
-
-	if (IS_ERR(buf))
-		return PTR_ERR(buf);
-
-	ret = vfs_follow_link(nd, buf);
-	kfree(buf);
-	return ret;
+	if (!f->dents) {
+		printk(KERN_ERR "jffs2_follow_link(): can't find symlink taerget\n");
+		return -EIO;
+	}
+	
+	return vfs_follow_link(nd, (char *)f->dents);
 }





More information about the linux-mtd-cvs mailing list