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/isofs/dir.c | 3 --- fs/isofs/file.c | 1 - fs/isofs/namei.c | 13 +++---------- 3 files changed, 3 insertions(+), 14 deletions(-) (limited to 'fs/isofs') diff --git a/fs/isofs/dir.c b/fs/isofs/dir.c index a57f9680c..23ca159c7 100644 --- a/fs/isofs/dir.c +++ b/fs/isofs/dir.c @@ -295,9 +295,6 @@ static int isofs_readdir(struct file *filp, struct iso_directory_record * tmpde; struct inode *inode = filp->f_dentry->d_inode; - if (!inode || !S_ISDIR(inode->i_mode)) - return -EBADF; - tmpname = (char *) __get_free_page(GFP_KERNEL); if (!tmpname) return -ENOMEM; diff --git a/fs/isofs/file.c b/fs/isofs/file.c index 0a508c90b..e2b4405d9 100644 --- a/fs/isofs/file.c +++ b/fs/isofs/file.c @@ -16,7 +16,6 @@ #include #include #include -#include /* * We have mostly NULLs here: the current defaults are OK for diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c index 364698dc2..7d4ca4e98 100644 --- a/fs/isofs/namei.c +++ b/fs/isofs/namei.c @@ -74,7 +74,6 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry, unsigned long *ino) char c; *ino = 0; - if (!dir) return NULL; if (!(block = dir->u.isofs_i.i_first_extent)) return NULL; @@ -228,7 +227,7 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry, unsigned long *ino) return retval; } -int isofs_lookup(struct inode * dir, struct dentry * dentry) +struct dentry *isofs_lookup(struct inode * dir, struct dentry * dentry) { unsigned long ino; struct buffer_head * bh; @@ -237,12 +236,6 @@ int isofs_lookup(struct inode * dir, struct dentry * dentry) #ifdef DEBUG printk("lookup: %x %s\n",dir->i_ino, dentry->d_name.name); #endif - if (!dir) - return -ENOENT; - - if (!S_ISDIR(dir->i_mode)) - return -ENOENT; - dentry->d_op = dir->i_sb->s_root->d_op; bh = isofs_find_entry(dir, dentry, &ino); @@ -253,8 +246,8 @@ int isofs_lookup(struct inode * dir, struct dentry * dentry) inode = iget(dir->i_sb,ino); if (!inode) - return -EACCES; + return ERR_PTR(-EACCES); } d_add(dentry, inode); - return 0; + return NULL; } -- cgit v1.2.3