vfs: add helpers to get root and pwd
[deliverable/linux.git] / fs / fs_struct.c
index eee059052db5b723e690fc5c1892062540c35c2b..1ee40eb9a2c05cc1751828af612c6942758b4c72 100644 (file)
@@ -106,12 +106,7 @@ struct fs_struct *copy_fs_struct(struct fs_struct *old)
                fs->in_exec = 0;
                rwlock_init(&fs->lock);
                fs->umask = old->umask;
-               read_lock(&old->lock);
-               fs->root = old->root;
-               path_get(&old->root);
-               fs->pwd = old->pwd;
-               path_get(&old->pwd);
-               read_unlock(&old->lock);
+               get_fs_root_and_pwd(old, &fs->root, &fs->pwd);
        }
        return fs;
 }
This page took 0.026172 seconds and 5 git commands to generate.