summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2010-08-10 11:41:36 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-11 00:28:20 -0400
commitf7ad3c6be90809b53b7f0ae9d4eaa45ce2564a79 (patch)
treedc9b09188bab35320200f318b5e7b52f24dc43ad /kernel
parent542ce7a9bc6b3838832ae0f4f8de30c667af8ff3 (diff)
downloadblackbird-op-linux-f7ad3c6be90809b53b7f0ae9d4eaa45ce2564a79.tar.gz
blackbird-op-linux-f7ad3c6be90809b53b7f0ae9d4eaa45ce2564a79.zip
vfs: add helpers to get root and pwd
Add three helpers that retrieve a refcounted copy of the root and cwd from the supplied fs_struct. get_fs_root() get_fs_pwd() get_fs_root_and_pwd() Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditsc.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index b87a63beb66c..1b31c130d034 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1835,13 +1835,8 @@ void __audit_getname(const char *name)
context->names[context->name_count].ino = (unsigned long)-1;
context->names[context->name_count].osid = 0;
++context->name_count;
- if (!context->pwd.dentry) {
- read_lock(&current->fs->lock);
- context->pwd = current->fs->pwd;
- path_get(&current->fs->pwd);
- read_unlock(&current->fs->lock);
- }
-
+ if (!context->pwd.dentry)
+ get_fs_pwd(current->fs, &context->pwd);
}
/* audit_putname - intercept a putname request
OpenPOWER on IntegriCloud