Skip to content

Commit 4f3b63e

Browse files
Sentaro Onizukabrauner
authored andcommitted
fs: Fix return type of do_mount() from long to int
Fix the return type of do_mount() function from long to int to match its ac tual behavior. The function only returns int values, and all callers, inclu ding those in fs/namespace.c and arch/alpha/kernel/osf_sys.c, already treat the return value as int. This change improves type consistency across the filesystem code and aligns the function signature with its existing impleme ntation and usage. Signed-off-by: Sentaro Onizuka <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent 344af27 commit 4f3b63e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fs/namespace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3835,7 +3835,7 @@ int path_mount(const char *dev_name, struct path *path,
38353835
data_page);
38363836
}
38373837

3838-
long do_mount(const char *dev_name, const char __user *dir_name,
3838+
int do_mount(const char *dev_name, const char __user *dir_name,
38393839
const char *type_page, unsigned long flags, void *data_page)
38403840
{
38413841
struct path path;

include/linux/mount.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ extern struct vfsmount *kern_mount(struct file_system_type *);
114114
extern void kern_unmount(struct vfsmount *mnt);
115115
extern int may_umount_tree(struct vfsmount *);
116116
extern int may_umount(struct vfsmount *);
117-
extern long do_mount(const char *, const char __user *,
117+
int do_mount(const char *, const char __user *,
118118
const char *, unsigned long, void *);
119119
extern struct vfsmount *collect_mounts(const struct path *);
120120
extern void drop_collected_mounts(struct vfsmount *);

0 commit comments

Comments
 (0)