constify path_get/path_put and fs_struct.c stuff

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro dcf787f3 26567cdb

Changed files
+10 -10
fs
include
+3 -3
fs/fs_struct.c
··· 10 10 * Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values. 11 11 * It can block. 12 12 */ 13 - void set_fs_root(struct fs_struct *fs, struct path *path) 13 + void set_fs_root(struct fs_struct *fs, const struct path *path) 14 14 { 15 15 struct path old_root; 16 16 ··· 29 29 * Replace the fs->{pwdmnt,pwd} with {mnt,dentry}. Put the old values. 30 30 * It can block. 31 31 */ 32 - void set_fs_pwd(struct fs_struct *fs, struct path *path) 32 + void set_fs_pwd(struct fs_struct *fs, const struct path *path) 33 33 { 34 34 struct path old_pwd; 35 35 ··· 53 53 return 1; 54 54 } 55 55 56 - void chroot_fs_refs(struct path *old_root, struct path *new_root) 56 + void chroot_fs_refs(const struct path *old_root, const struct path *new_root) 57 57 { 58 58 struct task_struct *g, *p; 59 59 struct fs_struct *fs;
+1 -1
fs/internal.h
··· 69 69 /* 70 70 * fs_struct.c 71 71 */ 72 - extern void chroot_fs_refs(struct path *, struct path *); 72 + extern void chroot_fs_refs(const struct path *, const struct path *); 73 73 74 74 /* 75 75 * file_table.c
+2 -2
fs/namei.c
··· 451 451 * 452 452 * Given a path increment the reference count to the dentry and the vfsmount. 453 453 */ 454 - void path_get(struct path *path) 454 + void path_get(const struct path *path) 455 455 { 456 456 mntget(path->mnt); 457 457 dget(path->dentry); ··· 464 464 * 465 465 * Given a path decrement the reference count to the dentry and the vfsmount. 466 466 */ 467 - void path_put(struct path *path) 467 + void path_put(const struct path *path) 468 468 { 469 469 dput(path->dentry); 470 470 mntput(path->mnt);
+2 -2
include/linux/fs_struct.h
··· 17 17 extern struct kmem_cache *fs_cachep; 18 18 19 19 extern void exit_fs(struct task_struct *); 20 - extern void set_fs_root(struct fs_struct *, struct path *); 21 - extern void set_fs_pwd(struct fs_struct *, struct path *); 20 + extern void set_fs_root(struct fs_struct *, const struct path *); 21 + extern void set_fs_pwd(struct fs_struct *, const struct path *); 22 22 extern struct fs_struct *copy_fs_struct(struct fs_struct *); 23 23 extern void free_fs_struct(struct fs_struct *); 24 24 extern int unshare_fs_struct(void);
+2 -2
include/linux/path.h
··· 9 9 struct dentry *dentry; 10 10 }; 11 11 12 - extern void path_get(struct path *); 13 - extern void path_put(struct path *); 12 + extern void path_get(const struct path *); 13 + extern void path_put(const struct path *); 14 14 15 15 static inline int path_equal(const struct path *path1, const struct path *path2) 16 16 {