summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-11-20 20:27:12 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2016-12-05 19:03:49 -0500
commitf0bb5aaf2c51267c49ed5e2c6103df22acfe30f5 (patch)
treeed42ba59576c11ad22daeae5291cfe3f5b71a9a1
parentca71cf71eeda04dc9ad18271504e499013af5415 (diff)
downloadlinux-f0bb5aaf2c51267c49ed5e2c6103df22acfe30f5.tar.bz2
vfs: misc struct path constification
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/namei.c4
-rw-r--r--fs/statfs.c2
-rw-r--r--fs/utimes.c2
-rw-r--r--include/linux/fs.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 5b4eed221530..1c8f4386b03f 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2895,7 +2895,7 @@ bool may_open_dev(const struct path *path)
!(path->mnt->mnt_sb->s_iflags & SB_I_NODEV);
}
-static int may_open(struct path *path, int acc_mode, int flag)
+static int may_open(const struct path *path, int acc_mode, int flag)
{
struct dentry *dentry = path->dentry;
struct inode *inode = dentry->d_inode;
@@ -2945,7 +2945,7 @@ static int may_open(struct path *path, int acc_mode, int flag)
static int handle_truncate(struct file *filp)
{
- struct path *path = &filp->f_path;
+ const struct path *path = &filp->f_path;
struct inode *inode = path->dentry->d_inode;
int error = get_write_access(inode);
if (error)
diff --git a/fs/statfs.c b/fs/statfs.c
index 083dc0ac9140..13ae259d4879 100644
--- a/fs/statfs.c
+++ b/fs/statfs.c
@@ -63,7 +63,7 @@ static int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf)
return retval;
}
-int vfs_statfs(struct path *path, struct kstatfs *buf)
+int vfs_statfs(const struct path *path, struct kstatfs *buf)
{
int error;
diff --git a/fs/utimes.c b/fs/utimes.c
index 22307cdf7014..5fdb505e307c 100644
--- a/fs/utimes.c
+++ b/fs/utimes.c
@@ -48,7 +48,7 @@ static bool nsec_valid(long nsec)
return nsec >= 0 && nsec <= 999999999;
}
-static int utimes_common(struct path *path, struct timespec *times)
+static int utimes_common(const struct path *path, struct timespec *times)
{
int error;
struct iattr newattrs;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 3056fe46f336..0e177d395efb 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2127,7 +2127,7 @@ extern struct vfsmount *collect_mounts(const struct path *);
extern void drop_collected_mounts(struct vfsmount *);
extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
struct vfsmount *);
-extern int vfs_statfs(struct path *, struct kstatfs *);
+extern int vfs_statfs(const struct path *, struct kstatfs *);
extern int user_statfs(const char __user *, struct kstatfs *);
extern int fd_statfs(int, struct kstatfs *);
extern int vfs_ustat(dev_t, struct kstatfs *);