patch-2.1.89 linux/fs/coda/symlink.c

Next file: linux/fs/coda/sysctl.c
Previous file: linux/fs/coda/super.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.88/linux/fs/coda/symlink.c linux/fs/coda/symlink.c
@@ -21,7 +21,7 @@
 #include <linux/coda.h>
 #include <linux/coda_linux.h>
 #include <linux/coda_psdev.h>
-#include <linux/coda_cnode.h>
+#include <linux/coda_fs_i.h>
 #include <linux/coda_cache.h>
 
 static int coda_readlink(struct dentry *de, char *buffer, int length);
@@ -39,41 +39,41 @@
 	NULL,			/* mknod */
 	NULL,			/* rename */
 	coda_readlink,		/* readlink */
-	coda_follow_link,	/* follow_link */
+	coda_follow_link,     	/* follow_link */
 	NULL,			/* readpage */
 	NULL,			/* writepage */
 	NULL,			/* bmap */
 	NULL,			/* truncate */
-	NULL,			/* permission */
-	NULL,			/* smap */
-	NULL,			/* update page */
-	NULL			/* revalidate */
+	NULL,            	/* permission */
+	NULL,                   /* smap */
+	NULL,                   /* update page */
+        NULL                    /* revalidate */
 };
 
 static int coda_readlink(struct dentry *de, char *buffer, int length)
 {
 	struct inode *inode = de->d_inode;
-	int len;
+        int len;
 	int error;
-	char *buf;
-	struct cnode *cp;
-	ENTRY;
-
-	cp = ITOC(inode);
-	CHECK_CNODE(cp);
-
-	/* the maximum length we receive is len */
-	if ( length > CFS_MAXPATHLEN ) 
-		len = CFS_MAXPATHLEN;
+        char *buf;
+	struct coda_inode_info *cp;
+        ENTRY;
+
+        cp = ITOC(inode);
+        CHECK_CNODE(cp);
+
+        /* the maximum length we receive is len */
+        if ( length > CFS_MAXPATHLEN ) 
+	        len = CFS_MAXPATHLEN;
 	else
-		len = length;
+	        len = length;
 	CODA_ALLOC(buf, char *, len);
 	if ( !buf ) 
-		return -ENOMEM;
+	        return -ENOMEM;
 	
 	error = venus_readlink(inode->i_sb, &(cp->c_fid), buf, &len);
 
-	CDEBUG(D_INODE, "result %s\n", buf);
+        CDEBUG(D_INODE, "result %s\n", buf);
 	if (! error) {
 		copy_to_user(buffer, buf, len);
 		put_user('\0', buffer + len);
@@ -89,15 +89,15 @@
 {
 	struct inode *inode = de->d_inode;
 	int error;
-	struct cnode *cnp;
+	struct coda_inode_info *cnp;
 	unsigned int len;
 	char mem[CFS_MAXPATHLEN];
 	char *path;
 ENTRY;
-	CDEBUG(D_INODE, "(%s/%ld)\n", kdevname(inode->i_dev), inode->i_ino);
+	CDEBUG(D_INODE, "(%x/%ld)\n", inode->i_dev, inode->i_ino);
 	
-	cnp = ITOC(inode);
-	CHECK_CNODE(cnp);
+        cnp = ITOC(inode);
+        CHECK_CNODE(cnp);
 
 	len = CFS_MAXPATHLEN;
 	error = venus_readlink(inode->i_sb, &(cnp->c_fid), mem, &len);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov