Lines Matching refs:arg
32 static int setfl(int fd, struct file * filp, unsigned long arg) in setfl() argument
41 if (((arg ^ filp->f_flags) & O_APPEND) && IS_APPEND(inode)) in setfl()
45 if ((arg & O_NOATIME) && !(filp->f_flags & O_NOATIME)) in setfl()
51 if (arg & O_NDELAY) in setfl()
52 arg |= O_NONBLOCK; in setfl()
54 if (arg & O_DIRECT) { in setfl()
61 error = filp->f_op->check_flags(arg); in setfl()
68 if (((arg ^ filp->f_flags) & FASYNC) && filp->f_op->fasync) { in setfl()
69 error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0); in setfl()
76 filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK); in setfl()
109 void f_setown(struct file *filp, unsigned long arg, int force) in f_setown() argument
113 int who = arg; in f_setown()
146 static int f_setown_ex(struct file *filp, unsigned long arg) in f_setown_ex() argument
148 struct f_owner_ex __user *owner_p = (void __user *)arg; in f_setown_ex()
186 static int f_getown_ex(struct file *filp, unsigned long arg) in f_getown_ex() argument
188 struct f_owner_ex __user *owner_p = (void __user *)arg; in f_getown_ex()
223 static int f_getowner_uids(struct file *filp, unsigned long arg) in f_getowner_uids() argument
226 uid_t __user *dst = (void __user *)arg; in f_getowner_uids()
241 static int f_getowner_uids(struct file *filp, unsigned long arg) in f_getowner_uids() argument
247 static long do_fcntl(int fd, unsigned int cmd, unsigned long arg, in do_fcntl() argument
254 err = f_dupfd(arg, filp, 0); in do_fcntl()
257 err = f_dupfd(arg, filp, O_CLOEXEC); in do_fcntl()
264 set_close_on_exec(fd, arg & FD_CLOEXEC); in do_fcntl()
270 err = setfl(fd, filp, arg); in do_fcntl()
277 err = fcntl_getlk(filp, cmd, (struct flock __user *) arg); in do_fcntl()
287 err = fcntl_setlk(fd, filp, cmd, (struct flock __user *) arg); in do_fcntl()
301 f_setown(filp, arg, 1); in do_fcntl()
305 err = f_getown_ex(filp, arg); in do_fcntl()
308 err = f_setown_ex(filp, arg); in do_fcntl()
311 err = f_getowner_uids(filp, arg); in do_fcntl()
318 if (!valid_signal(arg)) { in do_fcntl()
322 filp->f_owner.signum = arg; in do_fcntl()
328 err = fcntl_setlease(fd, filp, arg); in do_fcntl()
331 err = fcntl_dirnotify(fd, filp, arg); in do_fcntl()
335 err = pipe_fcntl(filp, cmd, arg); in do_fcntl()
339 err = shmem_fcntl(filp, cmd, arg); in do_fcntl()
360 SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) in SYSCALL_DEFINE3() argument
373 err = security_file_fcntl(f.file, cmd, arg); in SYSCALL_DEFINE3()
375 err = do_fcntl(fd, cmd, arg, f.file); in SYSCALL_DEFINE3()
385 unsigned long, arg) in SYSCALL_DEFINE3() argument
398 err = security_file_fcntl(f.file, cmd, arg); in SYSCALL_DEFINE3()
405 err = fcntl_getlk64(f.file, cmd, (struct flock64 __user *) arg); in SYSCALL_DEFINE3()
412 (struct flock64 __user *) arg); in SYSCALL_DEFINE3()
415 err = do_fcntl(fd, cmd, arg, f.file); in SYSCALL_DEFINE3()