patch-2.2.7 linux/fs/romfs/inode.c
Next file: linux/fs/smbfs/dir.c
Previous file: linux/fs/qnx4/namei.c
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Fri Apr 23 21:20:38 1999
- Orig file:
v2.2.6/linux/fs/romfs/inode.c
- Orig date:
Mon Sep 28 10:51:35 1998
diff -u --recursive --new-file v2.2.6/linux/fs/romfs/inode.c linux/fs/romfs/inode.c
@@ -267,9 +267,6 @@
int stored = 0;
char fsname[ROMFS_MAXFN]; /* XXX dynamic? */
- if (!i || !S_ISDIR(i->i_mode))
- return -EBADF;
-
maxoff = i->i_sb->u.romfs_sb.s_maxsize;
offset = filp->f_pos;
@@ -312,7 +309,7 @@
}
}
-static int
+static struct dentry *
romfs_lookup(struct inode *dir, struct dentry *dentry)
{
unsigned long offset, maxoff;
@@ -323,10 +320,6 @@
const char *name; /* got from dentry */
int len;
- res = -EBADF;
- if (!dir || !S_ISDIR(dir->i_mode))
- goto out;
-
res = 0; /* instead of ENOENT */
offset = dir->i_ino & ROMFH_MASK;
if (romfs_copyfrom(dir, &ri, offset, ROMFH_SIZE) <= 0)
@@ -379,7 +372,7 @@
}
out:
- return res;
+ return ERR_PTR(res);
}
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)