aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/open.c b/fs/open.c
index 22c41b543f2d..77becc041149 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -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
471SYSCALL_DEFINE2(fchmod, unsigned int, fd, mode_t, mode) 471SYSCALL_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
485SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, mode_t, mode) 485SYSCALL_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
498SYSCALL_DEFINE2(chmod, const char __user *, filename, mode_t, mode) 498SYSCALL_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);
612out_fput: 612out_fput:
613 fput(file); 613 fput(file);
614out: 614out:
@@ -877,7 +877,7 @@ void fd_install(unsigned int fd, struct file *file)
877 877
878EXPORT_SYMBOL(fd_install); 878EXPORT_SYMBOL(fd_install);
879 879
880static inline int build_open_flags(int flags, int mode, struct open_flags *op) 880static 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 */
951struct file *filp_open(const char *filename, int flags, int mode) 951struct 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}
971EXPORT_SYMBOL(file_open_root); 971EXPORT_SYMBOL(file_open_root);
972 972
973long do_sys_open(int dfd, const char __user *filename, int flags, int mode) 973long 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
997SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, int, mode) 997SYSCALL_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
1010SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, 1010SYSCALL_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 */
1030SYSCALL_DEFINE2(creat, const char __user *, pathname, int, mode) 1030SYSCALL_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}