diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
commit | 78c388aed2b7184182c08428db1de6c872d815f5 (patch) | |
tree | 4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /fs/affs | |
parent | eb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff) |
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'fs/affs')
-rw-r--r-- | fs/affs/namei.c | 6 | ||||
-rw-r--r-- | fs/affs/symlink.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/fs/affs/namei.c b/fs/affs/namei.c index 74d62f54e..22540a57b 100644 --- a/fs/affs/namei.c +++ b/fs/affs/namei.c @@ -242,8 +242,6 @@ affs_unlink(struct inode *dir, struct dentry *dentry) inode = dentry->d_inode; retval = -EPERM; - if (S_ISDIR(inode->i_mode)) - goto unlink_done; if (current->fsuid != inode->i_uid && current->fsuid != dir->i_uid && !capable(CAP_FOWNER)) goto unlink_done; @@ -376,13 +374,11 @@ affs_rmdir(struct inode *dir, struct dentry *dentry) /* * Make sure the directory is empty and the dentry isn't busy. */ - if (dentry->d_count > 1) - shrink_dcache_parent(dentry); retval = -ENOTEMPTY; if (!empty_dir(bh,AFFS_I2HSIZE(inode))) goto rmdir_done; retval = -EBUSY; - if (dentry->d_count > 1) + if (!list_empty(&dentry->d_hash)) goto rmdir_done; if ((retval = affs_remove_header(bh,inode)) < 0) diff --git a/fs/affs/symlink.c b/fs/affs/symlink.c index 2bf4cd00a..c3da66d40 100644 --- a/fs/affs/symlink.c +++ b/fs/affs/symlink.c @@ -20,7 +20,7 @@ #define MIN(a,b) (((a) < (b)) ? (a) : (b)) static int affs_readlink(struct dentry *, char *, int); -static struct dentry *affs_follow_link(struct dentry *dentry, struct dentry *base); +static struct dentry *affs_follow_link(struct dentry *dentry, struct dentry *base, unsigned int); struct inode_operations affs_symlink_inode_operations = { NULL, /* no file-operations */ @@ -98,7 +98,7 @@ affs_readlink(struct dentry *dentry, char *buffer, int buflen) } static struct dentry * -affs_follow_link(struct dentry *dentry, struct dentry *base) +affs_follow_link(struct dentry *dentry, struct dentry *base, unsigned int follow) { struct inode *inode = dentry->d_inode; struct buffer_head *bh; @@ -150,7 +150,7 @@ affs_follow_link(struct dentry *dentry, struct dentry *base) } buffer[i] = '\0'; affs_brelse(bh); - base = lookup_dentry(buffer,base,1); + base = lookup_dentry(buffer,base,follow); kfree(buffer); return base; } |