patch-2.1.86 linux/fs/ext2/namei.c
Next file: linux/fs/inode.c
Previous file: linux/fs/ext2/inode.c
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
Wed Feb 4 11:08:53 1998
- Orig file:
v2.1.85/linux/fs/ext2/namei.c
- Orig date:
Sun Jan 4 00:53:41 1998
diff -u --recursive --new-file v2.1.85/linux/fs/ext2/namei.c linux/fs/ext2/namei.c
@@ -830,28 +830,6 @@
return 0;
}
-/*
- * Trivially implemented using the dcache structure
- */
-static int subdir (struct dentry * new_dentry, struct dentry * old_dentry)
-{
- int result;
-
- result = 0;
- for (;;) {
- if (new_dentry != old_dentry) {
- struct dentry * parent = new_dentry->d_parent;
- if (parent == new_dentry)
- break;
- new_dentry = parent;
- continue;
- }
- result = 1;
- break;
- }
- return result;
-}
-
#define PARENT_INO(buffer) \
((struct ext2_dir_entry *) ((char *) buffer + \
le16_to_cpu(((struct ext2_dir_entry *) buffer)->rec_len)))->inode
@@ -915,7 +893,7 @@
if (!S_ISDIR(old_inode->i_mode))
goto end_rename;
retval = -EINVAL;
- if (subdir(new_dentry, old_dentry))
+ if (is_subdir(new_dentry, old_dentry))
goto end_rename;
retval = -ENOTEMPTY;
if (!empty_dir (new_inode))
@@ -938,7 +916,7 @@
if (new_inode && !S_ISDIR(new_inode->i_mode))
goto end_rename;
retval = -EINVAL;
- if (subdir(new_dentry, old_dentry))
+ if (is_subdir(new_dentry, old_dentry))
goto end_rename;
dir_bh = ext2_bread (old_inode, 0, 0, &retval);
if (!dir_bh)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov