patch-2.1.131 linux/fs/umsdos/rdir.c
Next file: linux/fs/vfat/namei.c
Previous file: linux/fs/umsdos/namei.c
Back to the patch index
Back to the overall index
- Lines: 76
- Date:
Tue Dec 1 22:47:18 1998
- Orig file:
v2.1.130/linux/fs/umsdos/rdir.c
- Orig date:
Sun Nov 8 14:03:08 1998
diff -u --recursive --new-file v2.1.130/linux/fs/umsdos/rdir.c linux/fs/umsdos/rdir.c
@@ -83,17 +83,17 @@
{
int ret;
- /* N.B. this won't work ... lookups of `..' are done by VFS */
-#ifdef BROKEN_TO_BITS
- if (pseudo_root && len == 2 && name[0] == '.' && name[1] == '.' &&
- dir == saved_root->d_inode) {
-printk (KERN_WARNING "umsdos_rlookup_x: we are at pseudo-root thingy?\n");
- pseudo_root->i_count++;
- d_add(dentry, pseudo_root);
- ret = 0;
+ if (saved_root && dir == saved_root->d_inode && !nopseudo &&
+ dentry->d_name.len == UMSDOS_PSDROOT_LEN &&
+ memcmp (dentry->d_name.name, UMSDOS_PSDROOT_NAME, UMSDOS_PSDROOT_LEN) == 0) {
+ /* #Specification: pseudo root / DOS/linux
+ * Even in the real root directory (c:\), the directory
+ * /linux won't show
+ */
+
+ ret = -ENOENT;
goto out;
}
-#endif
ret = msdos_lookup (dir, dentry);
if (ret) {
@@ -111,20 +111,6 @@
dentry->d_parent->d_name.name, dentry->d_name.name));
umsdos_patch_dentry_inode(dentry, 0);
- /* N.B. Won't work -- /linux dentry will already have
- * an inode, so we'll never get called here.
- */
-#ifdef BROKEN_TO_BITS
- if (dentry->d_inode == pseudo_root && !nopseudo) {
- /* #Specification: pseudo root / DOS/linux
- * Even in the real root directory (c:\), the directory
- * /linux won't show
- */
-printk(KERN_WARNING "umsdos_rlookup_x: do the pseudo-thingy...\n");
- /* make the dentry negative */
- d_delete(dentry);
- }
-#endif
}
out:
/* always install our dentry ops ... */
@@ -170,17 +156,13 @@
goto out;
ret = -EBUSY;
- if (dentry->d_count > 1) {
- shrink_dcache_parent(dentry);
- if (dentry->d_count > 1)
- goto out;
- }
+ if (!list_empty(&dentry->d_hash))
+ goto out;
ret = msdos_rmdir (dir, dentry);
if (ret != -ENOTEMPTY)
goto out;
- down(&dentry->d_inode->i_sem);
empty = umsdos_isempty (dentry);
if (empty == 1) {
struct dentry *demd;
@@ -194,7 +176,6 @@
dput(demd);
}
}
- up(&dentry->d_inode->i_sem);
if (ret)
goto out;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov