Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: fs: brlock vfsmount_lock fs: scale files_lock lglock: introduce special lglock and brlock spin locks tty: fix fu_list abuse fs: cleanup files_lock locking fs: remove extra lookup in __lookup_hash fs: fs_struct rwlock to spinlock apparmor: use task path helpers fs: dentry allocation consolidation fs: fix do_lookup false negative mbcache: Limit the maximum number of cache entries hostfs ->follow_link() braino hostfs: dumb (and usually harmless) tpyo - strncpy instead of strlcpy remove SWRITE* I/O types kill BH_Ordered flag vfs: update ctime when changing the file's permission by setfacl cramfs: only unlock new inodes fix reiserfs_evict_inode end_writeback second call
This commit is contained in:
@@ -62,19 +62,14 @@ static int d_namespace_path(struct path *path, char *buf, int buflen,
|
||||
int deleted, connected;
|
||||
int error = 0;
|
||||
|
||||
/* Get the root we want to resolve too */
|
||||
/* Get the root we want to resolve too, released below */
|
||||
if (flags & PATH_CHROOT_REL) {
|
||||
/* resolve paths relative to chroot */
|
||||
read_lock(¤t->fs->lock);
|
||||
root = current->fs->root;
|
||||
/* released below */
|
||||
path_get(&root);
|
||||
read_unlock(¤t->fs->lock);
|
||||
get_fs_root(current->fs, &root);
|
||||
} else {
|
||||
/* resolve paths relative to namespace */
|
||||
root.mnt = current->nsproxy->mnt_ns->root;
|
||||
root.dentry = root.mnt->mnt_root;
|
||||
/* released below */
|
||||
path_get(&root);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user