Commit 5dde0bf6 authored by James Simmons's avatar James Simmons

Merge

parents 55bcabb2 8f681e54
......@@ -1496,14 +1496,18 @@ asmlinkage long sys_mkdir(const char * pathname, int mode)
static void d_unhash(struct dentry *dentry)
{
dget(dentry);
spin_lock(&dcache_lock);
switch (atomic_read(&dentry->d_count)) {
default:
spin_unlock(&dcache_lock);
shrink_dcache_parent(dentry);
spin_lock(&dcache_lock);
if (atomic_read(&dentry->d_count) != 2)
break;
case 2:
d_drop(dentry);
list_del_init(&dentry->d_hash);
}
spin_unlock(&dcache_lock);
}
int vfs_rmdir(struct inode *dir, struct dentry *dentry)
......
......@@ -878,7 +878,7 @@ static int nfs_unlink(struct inode *dir, struct dentry *dentry)
return error;
}
if (!d_unhashed(dentry)) {
d_drop(dentry);
list_del_init(&dentry->d_hash);
need_rehash = 1;
}
spin_unlock(&dcache_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment