summaryrefslogtreecommitdiffstats
path: root/fs/hpfs
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-06-13 16:29:25 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-06-13 16:29:25 +0000
commitdb7d4daea91e105e3859cf461d7e53b9b77454b2 (patch)
tree9bb65b95440af09e8aca63abe56970dd3360cc57 /fs/hpfs
parent9c1c01ead627bdda9211c9abd5b758d6c687d8ac (diff)
Merge with Linux 2.2.8.
Diffstat (limited to 'fs/hpfs')
-rw-r--r--fs/hpfs/hpfs_fs.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/fs/hpfs/hpfs_fs.c b/fs/hpfs/hpfs_fs.c
index feafa2861..cb1d0215b 100644
--- a/fs/hpfs/hpfs_fs.c
+++ b/fs/hpfs/hpfs_fs.c
@@ -192,7 +192,7 @@ static ssize_t hpfs_dir_read(struct file *filp, char *buf,
size_t count, loff_t *ppos);
static int hpfs_readdir(struct file *filp,
void *dirent, filldir_t filldir);
-static int hpfs_lookup(struct inode *, struct dentry *);
+static struct dentry *hpfs_lookup(struct inode *, struct dentry *);
static const struct file_operations hpfs_dir_ops =
{
@@ -1119,7 +1119,7 @@ static secno bplus_lookup(struct inode *inode, struct bplus_header *b,
* the boondocks.)
*/
-static int hpfs_lookup(struct inode *dir, struct dentry *dentry)
+static struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry)
{
const char *name = dentry->d_name.name;
int len = dentry->d_name.len;
@@ -1129,14 +1129,6 @@ static int hpfs_lookup(struct inode *dir, struct dentry *dentry)
int retval;
struct quad_buffer_head qbh;
- /* In case of madness */
-
- retval = -ENOTDIR;
- if (dir == 0)
- goto out;
- if (!S_ISDIR(dir->i_mode))
- goto out;
-
/*
* Read in the directory entry. "." is there under the name ^A^A .
* Always read the dir even for . and .. in case we need the dates.
@@ -1208,7 +1200,7 @@ static int hpfs_lookup(struct inode *dir, struct dentry *dentry)
brelse4(&qbh);
out:
- return retval;
+ return ERR_PTR(retval);
}
/*
@@ -1374,11 +1366,6 @@ static int hpfs_readdir(struct file *filp, void * dirent,
long old_pos;
struct inode *inode = filp->f_dentry->d_inode;
- if (inode == 0
- || inode->i_sb == 0
- || !S_ISDIR(inode->i_mode))
- return -EBADF;
-
tempname = (char *) __get_free_page(GFP_KERNEL);
if (!tempname)
return -ENOMEM;