mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
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>
This commit is contained in:
parent
542ce7a9bc
commit
f7ad3c6be9
8 changed files with 49 additions and 62 deletions
|
@ -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(¤t->fs->lock);
|
||||
context->pwd = current->fs->pwd;
|
||||
path_get(¤t->fs->pwd);
|
||||
read_unlock(¤t->fs->lock);
|
||||
}
|
||||
|
||||
if (!context->pwd.dentry)
|
||||
get_fs_pwd(current->fs, &context->pwd);
|
||||
}
|
||||
|
||||
/* audit_putname - intercept a putname request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue