From db7d4daea91e105e3859cf461d7e53b9b77454b2 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 13 Jun 1999 16:29:25 +0000 Subject: Merge with Linux 2.2.8. --- fs/romfs/inode.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'fs/romfs') diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c index 211563b1c..fd374842e 100644 --- a/fs/romfs/inode.c +++ b/fs/romfs/inode.c @@ -267,9 +267,6 @@ romfs_readdir(struct file *filp, void *dirent, filldir_t filldir) 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 @@ romfs_readdir(struct file *filp, void *dirent, filldir_t filldir) } } -static int +static struct dentry * romfs_lookup(struct inode *dir, struct dentry *dentry) { unsigned long offset, maxoff; @@ -323,10 +320,6 @@ romfs_lookup(struct inode *dir, struct dentry *dentry) 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 @@ romfs_lookup(struct inode *dir, struct dentry *dentry) } out: - return res; + return ERR_PTR(res); } /* -- cgit v1.2.3