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

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

diff -u --recursive --new-file v2.1.88/linux/fs/coda/pioctl.c linux/fs/coda/pioctl.c
@@ -20,7 +20,7 @@
 
 #include <linux/coda.h>
 #include <linux/coda_linux.h>
-#include <linux/coda_cnode.h>
+#include <linux/coda_fs_i.h>
 #include <linux/coda_cache.h>
 #include <linux/coda_psdev.h>
 
@@ -103,7 +103,7 @@
         int error;
 	struct PioctlData data;
         struct inode *target_inode = NULL;
-        struct cnode *cnp;
+        struct coda_inode_info *cnp;
 
         ENTRY;
         /* get the Pioctl data arguments from user space */
@@ -115,22 +115,23 @@
          * Look up the pathname. Note that the pathname is in 
          * user memory, and namei takes care of this
          */
-	CDEBUG(D_PIOCTL, "namei, data.follow = %d\n", data.follow);
+	CDEBUG(D_PIOCTL, "namei, data.follow = %d\n", 
+	       data.follow);
         if ( data.follow ) {
                 target_de = namei(data.path);
 	} else {
 	        target_de = lnamei(data.path);
 	}
-
-	if (!target_de) {
+		
+	if ( PTR_ERR(target_de) == -ENOENT ) {
                 CDEBUG(D_PIOCTL, "error: lookup fails.\n");
-		return -EINVAL;
+		return PTR_ERR(target_de);
         } else {
 	        target_inode = target_de->d_inode;
 	}
 	
-	CDEBUG(D_PIOCTL, "target ino: 0x%ld, dev: %s\n",
-	       target_inode->i_ino, kdevname(target_inode->i_dev));
+	CDEBUG(D_PIOCTL, "target ino: 0x%ld, dev: 0x%d\n",
+	       target_inode->i_ino, target_inode->i_dev);
 
 	/* return if it is not a Coda inode */
 	if ( target_inode->i_sb != inode->i_sb ) {

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