Skip to content

Commit

Permalink
constify ksys_mount() string arguments
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jul 5, 2019
1 parent fd3e007 commit 3348884
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions drivers/base/devtmpfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,7 @@ int devtmpfs_mount(const char *mntdir)
if (!thread)
return 0;

err = ksys_mount("devtmpfs", (char *)mntdir, "devtmpfs", MS_SILENT,
NULL);
err = ksys_mount("devtmpfs", mntdir, "devtmpfs", MS_SILENT, NULL);
if (err)
printk(KERN_INFO "devtmpfs: error mounting %i\n", err);
else
Expand Down
4 changes: 2 additions & 2 deletions fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -3295,8 +3295,8 @@ struct dentry *mount_subtree(struct vfsmount *m, const char *name)
}
EXPORT_SYMBOL(mount_subtree);

int ksys_mount(char __user *dev_name, char __user *dir_name, char __user *type,
unsigned long flags, void __user *data)
int ksys_mount(const char __user *dev_name, const char __user *dir_name,
const char __user *type, unsigned long flags, void __user *data)
{
int ret;
char *kernel_type;
Expand Down
4 changes: 2 additions & 2 deletions include/linux/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -1228,8 +1228,8 @@ asmlinkage long sys_ni_syscall(void);
* the ksys_xyzyyz() functions prototyped below.
*/

int ksys_mount(char __user *dev_name, char __user *dir_name, char __user *type,
unsigned long flags, void __user *data);
int ksys_mount(const char __user *dev_name, const char __user *dir_name,
const char __user *type, unsigned long flags, void __user *data);
int ksys_umount(char __user *name, int flags);
int ksys_dup(unsigned int fildes);
int ksys_chroot(const char __user *filename);
Expand Down

0 comments on commit 3348884

Please sign in to comment.