patch-2.2.7 linux/fs/isofs/namei.c

Next file: linux/fs/minix/dir.c
Previous file: linux/fs/isofs/dir.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.6/linux/fs/isofs/namei.c linux/fs/isofs/namei.c
@@ -228,7 +228,7 @@
 	return retval;
 }
 
-int isofs_lookup(struct inode * dir, struct dentry * dentry)
+struct dentry *isofs_lookup(struct inode * dir, struct dentry * dentry)
 {
 	unsigned long ino;
 	struct buffer_head * bh;
@@ -237,12 +237,6 @@
 #ifdef DEBUG
 	printk("lookup: %x %s\n",dir->i_ino, dentry->d_name.name);
 #endif
-	if (!dir)
-		return -ENOENT;
-
-	if (!S_ISDIR(dir->i_mode))
-		return -ENOENT;
-
 	dentry->d_op = dir->i_sb->s_root->d_op;
 
 	bh = isofs_find_entry(dir, dentry, &ino);
@@ -253,8 +247,8 @@
 
 		inode = iget(dir->i_sb,ino);
 		if (!inode)
-			return -EACCES;
+			return ERR_PTR(-EACCES);
 	}
 	d_add(dentry, inode);
-	return 0;
+	return NULL;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)