summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2010-01-29 15:38:23 -0800
committerThomas Gleixner <tglx@linutronix.de>2010-04-27 17:32:35 +0200
commit6465e96519c08e46bd8e366ad5e7039fa9a035bb (patch)
tree0f25c38d5e264976180be92ef1d189255e57d3aa /security
parenta9865fc4ed12399c21bc7393d8f12431c563d18d (diff)
downloadlwn-6465e96519c08e46bd8e366ad5e7039fa9a035bb.tar.gz
lwn-6465e96519c08e46bd8e366ad5e7039fa9a035bb.zip
fs-dcache_lock-remove
dcache_lock no longer protects anything (I hope). remove it. This breaks a lot of the tree where I haven't thought about the problem, but it simplifies the dcache.c code quite a bit (and it's also probably a good thing to break unconverted code). So I include this here before making further changes to the locking. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: John Stultz <johnstul@us.ibm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/selinuxfs.c4
-rw-r--r--security/tomoyo/realpath.c4
2 files changed, 0 insertions, 8 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index dec4344462f9..7654521fced1 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -943,7 +943,6 @@ static void sel_remove_entries(struct dentry *de)
{
struct list_head *node;
- spin_lock(&dcache_lock);
spin_lock(&de->d_lock);
node = de->d_subdirs.next;
while (node != &de->d_subdirs) {
@@ -956,11 +955,9 @@ static void sel_remove_entries(struct dentry *de)
dget_locked_dlock(d);
spin_unlock(&de->d_lock);
spin_unlock(&d->d_lock);
- spin_unlock(&dcache_lock);
d_delete(d);
simple_unlink(de->d_inode, d);
dput(d);
- spin_lock(&dcache_lock);
spin_lock(&de->d_lock);
} else
spin_unlock(&d->d_lock);
@@ -968,7 +965,6 @@ static void sel_remove_entries(struct dentry *de)
}
spin_unlock(&de->d_lock);
- spin_unlock(&dcache_lock);
}
#define BOOL_DIR_NAME "booleans"
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c
index 776146b68e57..f976358e6d4c 100644
--- a/security/tomoyo/realpath.c
+++ b/security/tomoyo/realpath.c
@@ -103,13 +103,9 @@ int tomoyo_realpath_from_path2(struct path *path, char *newname,
ns_root.mnt = mntget(root.mnt->mnt_ns->root);
if (ns_root.mnt)
ns_root.dentry = dget(ns_root.mnt->mnt_root);
- vfsmount_read_unlock();
- spin_lock(&dcache_lock);
- vfsmount_read_lock();
tmp = ns_root;
sp = __d_path(path, &tmp, newname, newname_len);
vfsmount_read_unlock();
- spin_unlock(&dcache_lock);
path_put(&root);
path_put(&ns_root);
/* Prepend "/proc" prefix if using internal proc vfs mount. */