diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-06-13 16:29:25 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-06-13 16:29:25 +0000 |
commit | db7d4daea91e105e3859cf461d7e53b9b77454b2 (patch) | |
tree | 9bb65b95440af09e8aca63abe56970dd3360cc57 /fs/romfs | |
parent | 9c1c01ead627bdda9211c9abd5b758d6c687d8ac (diff) |
Merge with Linux 2.2.8.
Diffstat (limited to 'fs/romfs')
-rw-r--r-- | fs/romfs/inode.c | 11 |
1 files changed, 2 insertions, 9 deletions
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); } /* |