]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
constify path_get/path_put and fs_struct.c stuff
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 2 Mar 2013 04:51:07 +0000 (23:51 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 2 Mar 2013 04:51:07 +0000 (23:51 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/fs_struct.c
fs/internal.h
fs/namei.c
include/linux/fs_struct.h
include/linux/path.h

index fe6ca583bbc02b3513a2b3f76bb4b169c0f7d41c..d8ac61d0c9320ab194c9df90a1eaf3c858a55c0f 100644 (file)
@@ -10,7 +10,7 @@
  * Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values.
  * It can block.
  */
-void set_fs_root(struct fs_struct *fs, struct path *path)
+void set_fs_root(struct fs_struct *fs, const struct path *path)
 {
        struct path old_root;
 
@@ -29,7 +29,7 @@ void set_fs_root(struct fs_struct *fs, struct path *path)
  * Replace the fs->{pwdmnt,pwd} with {mnt,dentry}. Put the old values.
  * It can block.
  */
-void set_fs_pwd(struct fs_struct *fs, struct path *path)
+void set_fs_pwd(struct fs_struct *fs, const struct path *path)
 {
        struct path old_pwd;
 
@@ -53,7 +53,7 @@ static inline int replace_path(struct path *p, const struct path *old, const str
        return 1;
 }
 
-void chroot_fs_refs(struct path *old_root, struct path *new_root)
+void chroot_fs_refs(const struct path *old_root, const struct path *new_root)
 {
        struct task_struct *g, *p;
        struct fs_struct *fs;
index 2f6af7f645ebc3d8862da4edb1d71bc811c8d788..507141fceb99669f7554e330d81605d2fff248b2 100644 (file)
@@ -69,7 +69,7 @@ extern void __mnt_drop_write_file(struct file *);
 /*
  * fs_struct.c
  */
-extern void chroot_fs_refs(struct path *, struct path *);
+extern void chroot_fs_refs(const struct path *, const struct path *);
 
 /*
  * file_table.c
index dc984fee553239babe77672918be83f80aa325a6..961bc1268366d80c8b44adf5adc0aec26f59edbd 100644 (file)
@@ -451,7 +451,7 @@ int inode_permission(struct inode *inode, int mask)
  *
  * Given a path increment the reference count to the dentry and the vfsmount.
  */
-void path_get(struct path *path)
+void path_get(const struct path *path)
 {
        mntget(path->mnt);
        dget(path->dentry);
@@ -464,7 +464,7 @@ EXPORT_SYMBOL(path_get);
  *
  * Given a path decrement the reference count to the dentry and the vfsmount.
  */
-void path_put(struct path *path)
+void path_put(const struct path *path)
 {
        dput(path->dentry);
        mntput(path->mnt);
index d0ae3a84bcfb1e65b25a064bf17818ea2cf5d8aa..729eded4b24f09fa93b7f85b50aaca4b297fd2f9 100644 (file)
@@ -17,8 +17,8 @@ struct fs_struct {
 extern struct kmem_cache *fs_cachep;
 
 extern void exit_fs(struct task_struct *);
-extern void set_fs_root(struct fs_struct *, struct path *);
-extern void set_fs_pwd(struct fs_struct *, struct path *);
+extern void set_fs_root(struct fs_struct *, const struct path *);
+extern void set_fs_pwd(struct fs_struct *, const struct path *);
 extern struct fs_struct *copy_fs_struct(struct fs_struct *);
 extern void free_fs_struct(struct fs_struct *);
 extern int unshare_fs_struct(void);
index edc98dec6266c2a7e6a5f3bc9129ed2aa6f3fb00..d1372186f4315c3de45b3949017026dca2d7f109 100644 (file)
@@ -9,8 +9,8 @@ struct path {
        struct dentry *dentry;
 };
 
-extern void path_get(struct path *);
-extern void path_put(struct path *);
+extern void path_get(const struct path *);
+extern void path_put(const struct path *);
 
 static inline int path_equal(const struct path *path1, const struct path *path2)
 {