diff options
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -456,7 +456,7 @@ static int chmod_common(struct path *path, umode_t mode) | |||
456 | if (error) | 456 | if (error) |
457 | return error; | 457 | return error; |
458 | mutex_lock(&inode->i_mutex); | 458 | mutex_lock(&inode->i_mutex); |
459 | error = security_path_chmod(path->dentry, path->mnt, mode); | 459 | error = security_path_chmod(path, mode); |
460 | if (error) | 460 | if (error) |
461 | goto out_unlock; | 461 | goto out_unlock; |
462 | newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); | 462 | newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO); |
@@ -468,7 +468,7 @@ out_unlock: | |||
468 | return error; | 468 | return error; |
469 | } | 469 | } |
470 | 470 | ||
471 | SYSCALL_DEFINE2(fchmod, unsigned int, fd, mode_t, mode) | 471 | SYSCALL_DEFINE2(fchmod, unsigned int, fd, umode_t, mode) |
472 | { | 472 | { |
473 | struct file * file; | 473 | struct file * file; |
474 | int err = -EBADF; | 474 | int err = -EBADF; |
@@ -482,7 +482,7 @@ SYSCALL_DEFINE2(fchmod, unsigned int, fd, mode_t, mode) | |||
482 | return err; | 482 | return err; |
483 | } | 483 | } |
484 | 484 | ||
485 | SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, mode_t, mode) | 485 | SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, umode_t, mode) |
486 | { | 486 | { |
487 | struct path path; | 487 | struct path path; |
488 | int error; | 488 | int error; |
@@ -495,7 +495,7 @@ SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, mode_t, mode) | |||
495 | return error; | 495 | return error; |
496 | } | 496 | } |
497 | 497 | ||
498 | SYSCALL_DEFINE2(chmod, const char __user *, filename, mode_t, mode) | 498 | SYSCALL_DEFINE2(chmod, const char __user *, filename, umode_t, mode) |
499 | { | 499 | { |
500 | return sys_fchmodat(AT_FDCWD, filename, mode); | 500 | return sys_fchmodat(AT_FDCWD, filename, mode); |
501 | } | 501 | } |
@@ -608,7 +608,7 @@ SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group) | |||
608 | dentry = file->f_path.dentry; | 608 | dentry = file->f_path.dentry; |
609 | audit_inode(NULL, dentry); | 609 | audit_inode(NULL, dentry); |
610 | error = chown_common(&file->f_path, user, group); | 610 | error = chown_common(&file->f_path, user, group); |
611 | mnt_drop_write(file->f_path.mnt); | 611 | mnt_drop_write_file(file); |
612 | out_fput: | 612 | out_fput: |
613 | fput(file); | 613 | fput(file); |
614 | out: | 614 | out: |
@@ -877,7 +877,7 @@ void fd_install(unsigned int fd, struct file *file) | |||
877 | 877 | ||
878 | EXPORT_SYMBOL(fd_install); | 878 | EXPORT_SYMBOL(fd_install); |
879 | 879 | ||
880 | static inline int build_open_flags(int flags, int mode, struct open_flags *op) | 880 | static inline int build_open_flags(int flags, umode_t mode, struct open_flags *op) |
881 | { | 881 | { |
882 | int lookup_flags = 0; | 882 | int lookup_flags = 0; |
883 | int acc_mode; | 883 | int acc_mode; |
@@ -948,7 +948,7 @@ static inline int build_open_flags(int flags, int mode, struct open_flags *op) | |||
948 | * have to. But in generally you should not do this, so please move | 948 | * have to. But in generally you should not do this, so please move |
949 | * along, nothing to see here.. | 949 | * along, nothing to see here.. |
950 | */ | 950 | */ |
951 | struct file *filp_open(const char *filename, int flags, int mode) | 951 | struct file *filp_open(const char *filename, int flags, umode_t mode) |
952 | { | 952 | { |
953 | struct open_flags op; | 953 | struct open_flags op; |
954 | int lookup = build_open_flags(flags, mode, &op); | 954 | int lookup = build_open_flags(flags, mode, &op); |
@@ -970,7 +970,7 @@ struct file *file_open_root(struct dentry *dentry, struct vfsmount *mnt, | |||
970 | } | 970 | } |
971 | EXPORT_SYMBOL(file_open_root); | 971 | EXPORT_SYMBOL(file_open_root); |
972 | 972 | ||
973 | long do_sys_open(int dfd, const char __user *filename, int flags, int mode) | 973 | long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode) |
974 | { | 974 | { |
975 | struct open_flags op; | 975 | struct open_flags op; |
976 | int lookup = build_open_flags(flags, mode, &op); | 976 | int lookup = build_open_flags(flags, mode, &op); |
@@ -994,7 +994,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, int mode) | |||
994 | return fd; | 994 | return fd; |
995 | } | 995 | } |
996 | 996 | ||
997 | SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, int, mode) | 997 | SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode) |
998 | { | 998 | { |
999 | long ret; | 999 | long ret; |
1000 | 1000 | ||
@@ -1008,7 +1008,7 @@ SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, int, mode) | |||
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, | 1010 | SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, |
1011 | int, mode) | 1011 | umode_t, mode) |
1012 | { | 1012 | { |
1013 | long ret; | 1013 | long ret; |
1014 | 1014 | ||
@@ -1027,7 +1027,7 @@ SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, | |||
1027 | * For backward compatibility? Maybe this should be moved | 1027 | * For backward compatibility? Maybe this should be moved |
1028 | * into arch/i386 instead? | 1028 | * into arch/i386 instead? |
1029 | */ | 1029 | */ |
1030 | SYSCALL_DEFINE2(creat, const char __user *, pathname, int, mode) | 1030 | SYSCALL_DEFINE2(creat, const char __user *, pathname, umode_t, mode) |
1031 | { | 1031 | { |
1032 | return sys_open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode); | 1032 | return sys_open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode); |
1033 | } | 1033 | } |