mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
vfs: misc struct path constification
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -2895,7 +2895,7 @@ bool may_open_dev(const struct path *path)
|
|||||||
!(path->mnt->mnt_sb->s_iflags & SB_I_NODEV);
|
!(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 dentry *dentry = path->dentry;
|
||||||
struct inode *inode = dentry->d_inode;
|
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)
|
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;
|
struct inode *inode = path->dentry->d_inode;
|
||||||
int error = get_write_access(inode);
|
int error = get_write_access(inode);
|
||||||
if (error)
|
if (error)
|
||||||
|
@@ -63,7 +63,7 @@ static int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
int vfs_statfs(struct path *path, struct kstatfs *buf)
|
int vfs_statfs(const struct path *path, struct kstatfs *buf)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
@@ -48,7 +48,7 @@ static bool nsec_valid(long nsec)
|
|||||||
return nsec >= 0 && nsec <= 999999999;
|
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;
|
int error;
|
||||||
struct iattr newattrs;
|
struct iattr newattrs;
|
||||||
|
@@ -2127,7 +2127,7 @@ extern struct vfsmount *collect_mounts(const struct path *);
|
|||||||
extern void drop_collected_mounts(struct vfsmount *);
|
extern void drop_collected_mounts(struct vfsmount *);
|
||||||
extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
|
extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
|
||||||
struct vfsmount *);
|
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 user_statfs(const char __user *, struct kstatfs *);
|
||||||
extern int fd_statfs(int, struct kstatfs *);
|
extern int fd_statfs(int, struct kstatfs *);
|
||||||
extern int vfs_ustat(dev_t, struct kstatfs *);
|
extern int vfs_ustat(dev_t, struct kstatfs *);
|
||||||
|
Reference in New Issue
Block a user