patch-2.2.7 linux/fs/hfs/dir_nat.c

Next file: linux/fs/hpfs/hpfs_fs.c
Previous file: linux/fs/hfs/dir_dbl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.6/linux/fs/hfs/dir_nat.c linux/fs/hfs/dir_nat.c
@@ -29,7 +29,7 @@
 
 /*================ Forward declarations ================*/
 
-static int nat_lookup(struct inode *, struct dentry *);
+static struct dentry *nat_lookup(struct inode *, struct dentry *);
 static int nat_readdir(struct file *, void *, filldir_t);
 static int nat_rmdir(struct inode *, struct dentry *);
 static int nat_hdr_unlink(struct inode *, struct dentry *);
@@ -136,7 +136,7 @@
  * the inode corresponding to an entry in a directory, given the inode
  * for the directory and the name (and its length) of the entry.
  */
-static int nat_lookup(struct inode * dir, struct dentry *dentry)
+static struct dentry *nat_lookup(struct inode * dir, struct dentry *dentry)
 {
 	ino_t dtype;
 	struct hfs_name cname;
@@ -144,10 +144,6 @@
 	struct hfs_cat_key key;
 	struct inode *inode = NULL;
 
-	if (!dir || !S_ISDIR(dir->i_mode)) {
-		return -ENOENT;
-	}
-
 	dentry->d_op = &hfs_dentry_operations;
 	entry = HFS_I(dir)->entry;
 	dtype = HFS_ITYPE(dir->i_ino);
@@ -199,7 +195,7 @@
 
 done:
 	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)