patch-2.2.7 linux/fs/hfs/dir_cap.c
Next file: linux/fs/hfs/dir_dbl.c
Previous file: linux/fs/fat/misc.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Fri Apr 23 21:20:37 1999
- Orig file:
v2.2.6/linux/fs/hfs/dir_cap.c
- Orig date:
Sun Nov 8 14:03:06 1998
diff -u --recursive --new-file v2.2.6/linux/fs/hfs/dir_cap.c linux/fs/hfs/dir_cap.c
@@ -27,7 +27,7 @@
/*================ Forward declarations ================*/
-static int cap_lookup(struct inode *, struct dentry *);
+static struct dentry *cap_lookup(struct inode *, struct dentry *);
static int cap_readdir(struct file *, void *, filldir_t);
/*================ Global variables ================*/
@@ -147,7 +147,7 @@
* 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 cap_lookup(struct inode * dir, struct dentry *dentry)
+static struct dentry *cap_lookup(struct inode * dir, struct dentry *dentry)
{
ino_t dtype;
struct hfs_name cname;
@@ -155,10 +155,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);
@@ -207,7 +203,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)