···10 * Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values.11 * It can block.12 */13-void set_fs_root(struct fs_struct *fs, struct path *path)14{15 struct path old_root;16···29 * Replace the fs->{pwdmnt,pwd} with {mnt,dentry}. Put the old values.30 * It can block.31 */32-void set_fs_pwd(struct fs_struct *fs, struct path *path)33{34 struct path old_pwd;35···53 return 1;54}5556-void chroot_fs_refs(struct path *old_root, struct path *new_root)57{58 struct task_struct *g, *p;59 struct fs_struct *fs;
···10 * Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values.11 * It can block.12 */13+void set_fs_root(struct fs_struct *fs, const struct path *path)14{15 struct path old_root;16···29 * Replace the fs->{pwdmnt,pwd} with {mnt,dentry}. Put the old values.30 * It can block.31 */32+void set_fs_pwd(struct fs_struct *fs, const struct path *path)33{34 struct path old_pwd;35···53 return 1;54}5556+void chroot_fs_refs(const struct path *old_root, const struct path *new_root)57{58 struct task_struct *g, *p;59 struct fs_struct *fs;
···451 *452 * Given a path increment the reference count to the dentry and the vfsmount.453 */454-void path_get(struct path *path)455{456 mntget(path->mnt);457 dget(path->dentry);···464 *465 * Given a path decrement the reference count to the dentry and the vfsmount.466 */467-void path_put(struct path *path)468{469 dput(path->dentry);470 mntput(path->mnt);
···451 *452 * Given a path increment the reference count to the dentry and the vfsmount.453 */454+void path_get(const struct path *path)455{456 mntget(path->mnt);457 dget(path->dentry);···464 *465 * Given a path decrement the reference count to the dentry and the vfsmount.466 */467+void path_put(const struct path *path)468{469 dput(path->dentry);470 mntput(path->mnt);