summaryrefslogtreecommitdiffstats
path: root/fs/qnx4
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
commit86464aed71025541805e7b1515541aee89879e33 (patch)
treee01a457a4912a8553bc65524aa3125d51f29f810 /fs/qnx4
parent88f99939ecc6a95a79614574cb7d95ffccfc3466 (diff)
Merge with Linux 2.2.1.
Diffstat (limited to 'fs/qnx4')
-rw-r--r--fs/qnx4/namei.c37
-rw-r--r--fs/qnx4/symlinks.c4
2 files changed, 8 insertions, 33 deletions
diff --git a/fs/qnx4/namei.c b/fs/qnx4/namei.c
index 9c6617f50..267ecb110 100644
--- a/fs/qnx4/namei.c
+++ b/fs/qnx4/namei.c
@@ -168,29 +168,9 @@ int qnx4_rmdir(struct inode *dir, struct dentry *dentry)
if (bh == NULL) {
return -ENOENT;
}
- if ((inode = iget(dir->i_sb, ino)) == NULL) {
- QNX4DEBUG(("qnx4: lookup->iget -> NULL\n"));
- retval = -EACCES;
- goto end_rmdir;
- }
- retval = -EPERM;
- if ((dir->i_mode & S_ISVTX) &&
- current->fsuid != inode->i_uid &&
- current->fsuid != dir->i_uid && !capable(CAP_FOWNER)) {
- QNX4DEBUG(("qnx4: rmdir->capabilities\n"));
- goto end_rmdir;
- }
- if (inode->i_dev != dir->i_dev) {
- QNX4DEBUG(("qnx4: rmdir->different devices\n"));
- goto end_rmdir;
- }
- if (inode == dir) { /* we may not delete ".", but "../dir" is ok */
- QNX4DEBUG(("qnx4: inode==dir\n"));
- goto end_rmdir;
- }
- if (!S_ISDIR(inode->i_mode)) {
- QNX4DEBUG(("qnx4: rmdir->not a directory\n"));
- retval = -ENOTDIR;
+ inode = dentry->d_inode;
+ if (inode->i_ino != ino) {
+ retval = -EIO;
goto end_rmdir;
}
#if 0
@@ -239,17 +219,12 @@ int qnx4_unlink(struct inode *dir, struct dentry *dentry)
if (bh == NULL) {
return -ENOENT;
}
- if ((inode = iget(dir->i_sb, ino)) == NULL) {
- QNX4DEBUG(("qnx4: lookup->iget -> NULL\n"));
- retval = -EACCES;
+ inode = dentry->d_inode;
+ if (inode->i_ino != ino) {
+ retval = -EIO;
goto end_unlink;
}
retval = -EPERM;
- if ((dir->i_mode & S_ISVTX) &&
- current->fsuid != inode->i_uid &&
- current->fsuid != dir->i_uid && !capable(CAP_FOWNER)) {
- goto end_unlink;
- }
if (!inode->i_nlink) {
QNX4DEBUG(("Deleting nonexistent file (%s:%lu), %d\n",
kdevname(inode->i_dev),
diff --git a/fs/qnx4/symlinks.c b/fs/qnx4/symlinks.c
index 36679c52a..083042d71 100644
--- a/fs/qnx4/symlinks.c
+++ b/fs/qnx4/symlinks.c
@@ -23,7 +23,7 @@
#include <asm/uaccess.h>
static int qnx4_readlink(struct dentry *, char *, int);
-static struct dentry *qnx4_follow_link(struct dentry *, struct dentry *);
+static struct dentry *qnx4_follow_link(struct dentry *, struct dentry *, unsigned int follow);
/*
* symlinks can't do much...
@@ -50,7 +50,7 @@ struct inode_operations qnx4_symlink_inode_operations =
};
static struct dentry *qnx4_follow_link(struct dentry *dentry,
- struct dentry *base)
+ struct dentry *base, unsigned int follow)
{
#if 0
struct inode *inode = dentry->d_inode;