mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
Use struct path in fs_struct
* Use struct path in fs_struct. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Jan Blunck <jblunck@suse.de> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5dd784d049
commit
6ac08c39a1
9 changed files with 87 additions and 111 deletions
|
@ -600,16 +600,16 @@ static struct fs_struct *__copy_fs_struct(struct fs_struct *old)
|
|||
rwlock_init(&fs->lock);
|
||||
fs->umask = old->umask;
|
||||
read_lock(&old->lock);
|
||||
fs->rootmnt = mntget(old->rootmnt);
|
||||
fs->root = dget(old->root);
|
||||
fs->pwdmnt = mntget(old->pwdmnt);
|
||||
fs->pwd = dget(old->pwd);
|
||||
if (old->altroot) {
|
||||
fs->altrootmnt = mntget(old->altrootmnt);
|
||||
fs->altroot = dget(old->altroot);
|
||||
fs->root = old->root;
|
||||
path_get(&old->root);
|
||||
fs->pwd = old->pwd;
|
||||
path_get(&old->pwd);
|
||||
if (old->altroot.dentry) {
|
||||
fs->altroot = old->altroot;
|
||||
path_get(&old->altroot);
|
||||
} else {
|
||||
fs->altrootmnt = NULL;
|
||||
fs->altroot = NULL;
|
||||
fs->altroot.mnt = NULL;
|
||||
fs->altroot.dentry = NULL;
|
||||
}
|
||||
read_unlock(&old->lock);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue