summaryrefslogtreecommitdiffstats
path: root/fs/coda
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
commit78c388aed2b7184182c08428db1de6c872d815f5 (patch)
tree4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /fs/coda
parenteb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff)
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'fs/coda')
-rw-r--r--fs/coda/dir.c21
-rw-r--r--fs/coda/symlink.c7
2 files changed, 7 insertions, 21 deletions
diff --git a/fs/coda/dir.c b/fs/coda/dir.c
index e074ca346..dc4734d0b 100644
--- a/fs/coda/dir.c
+++ b/fs/coda/dir.c
@@ -520,7 +520,7 @@ int coda_rmdir(struct inode *dir, struct dentry *de)
struct coda_inode_info *dircnp;
const char *name = de->d_name.name;
int len = de->d_name.len;
- int error, rehash = 0;
+ int error;
ENTRY;
coda_vfs_stat.rmdir++;
@@ -535,24 +535,13 @@ int coda_rmdir(struct inode *dir, struct dentry *de)
if (len > CFS_MAXNAMLEN)
return -ENAMETOOLONG;
- error = -EBUSY;
- if (de->d_count > 1) {
- /* Attempt to shrink child dentries ... */
- shrink_dcache_parent(de);
- if (de->d_count > 1)
- return error;
- }
- /* Drop the dentry to force a new lookup */
- if (!list_empty(&de->d_hash)) {
- d_drop(de);
- rehash = 1;
- }
+ if (!list_empty(&de->d_hash))
+ return -EBUSY;
/* update i_nlink and free the inode before unlinking;
if rmdir fails a new lookup set i_nlink right.*/
if (de->d_inode->i_nlink)
de->d_inode->i_nlink --;
- d_delete(de);
error = venus_rmdir(dir->i_sb, &(dircnp->c_fid), name, len);
@@ -561,10 +550,6 @@ int coda_rmdir(struct inode *dir, struct dentry *de)
return error;
}
- if (rehash)
- d_add(de, NULL);
- /* XXX how can mtime be set? */
-
return 0;
}
diff --git a/fs/coda/symlink.c b/fs/coda/symlink.c
index eb2fe150d..f065c0270 100644
--- a/fs/coda/symlink.c
+++ b/fs/coda/symlink.c
@@ -26,7 +26,7 @@
#include <linux/coda_proc.h>
static int coda_readlink(struct dentry *de, char *buffer, int length);
-static struct dentry *coda_follow_link(struct dentry *, struct dentry *);
+static struct dentry *coda_follow_link(struct dentry *, struct dentry *, unsigned int);
struct inode_operations coda_symlink_inode_operations = {
NULL, /* no file-operations */
@@ -86,7 +86,8 @@ static int coda_readlink(struct dentry *de, char *buffer, int length)
}
static struct dentry *coda_follow_link(struct dentry *de,
- struct dentry *base)
+ struct dentry *base,
+ unsigned int follow)
{
struct inode *inode = de->d_inode;
int error;
@@ -116,7 +117,7 @@ static struct dentry *coda_follow_link(struct dentry *de,
memcpy(path, mem, len);
path[len] = 0;
- base = lookup_dentry(path, base, 1);
+ base = lookup_dentry(path, base, follow);
kfree(path);
return base;
}