Skip to content

Commit 3348884

Browse files
author
Al Viro
committed
constify ksys_mount() string arguments
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent fd3e007 commit 3348884

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎drivers/base/devtmpfs.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,7 @@ int devtmpfs_mount(const char *mntdir)
357357
if (!thread)
358358
return 0;
359359

360-
err = ksys_mount("devtmpfs", (char *)mntdir, "devtmpfs", MS_SILENT,
361-
NULL);
360+
err = ksys_mount("devtmpfs", mntdir, "devtmpfs", MS_SILENT, NULL);
362361
if (err)
363362
printk(KERN_INFO "devtmpfs: error mounting %i\n", err);
364363
else

‎fs/namespace.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3295,8 +3295,8 @@ struct dentry *mount_subtree(struct vfsmount *m, const char *name)
32953295
}
32963296
EXPORT_SYMBOL(mount_subtree);
32973297

3298-
int ksys_mount(char __user *dev_name, char __user *dir_name, char __user *type,
3299-
unsigned long flags, void __user *data)
3298+
int ksys_mount(const char __user *dev_name, const char __user *dir_name,
3299+
const char __user *type, unsigned long flags, void __user *data)
33003300
{
33013301
int ret;
33023302
char *kernel_type;

‎include/linux/syscalls.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,8 +1228,8 @@ asmlinkage long sys_ni_syscall(void);
12281228
* the ksys_xyzyyz() functions prototyped below.
12291229
*/
12301230

1231-
int ksys_mount(char __user *dev_name, char __user *dir_name, char __user *type,
1232-
unsigned long flags, void __user *data);
1231+
int ksys_mount(const char __user *dev_name, const char __user *dir_name,
1232+
const char __user *type, unsigned long flags, void __user *data);
12331233
int ksys_umount(char __user *name, int flags);
12341234
int ksys_dup(unsigned int fildes);
12351235
int ksys_chroot(const char __user *filename);

0 commit comments

Comments
 (0)