Lines Matching defs:arg

35 static int setfl(int fd, struct file * filp, unsigned long arg)
44 if (((arg ^ filp->f_flags) & O_APPEND) && IS_APPEND(inode))
48 if ((arg & O_NOATIME) && !(filp->f_flags & O_NOATIME))
54 if (arg & O_NDELAY)
55 arg |= O_NONBLOCK;
58 if (!S_ISFIFO(inode->i_mode) && (arg & O_DIRECT)) {
65 error = filp->f_op->check_flags(arg);
72 if (((arg ^ filp->f_flags) & FASYNC) && filp->f_op->fasync) {
73 error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0);
80 filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK);
113 int f_setown(struct file *filp, unsigned long arg, int force)
117 int who = arg, ret = 0;
165 static int f_setown_ex(struct file *filp, unsigned long arg)
167 struct f_owner_ex __user *owner_p = (void __user *)arg;
205 static int f_getown_ex(struct file *filp, unsigned long arg)
207 struct f_owner_ex __user *owner_p = (void __user *)arg;
245 static int f_getowner_uids(struct file *filp, unsigned long arg)
248 uid_t __user *dst = (void __user *)arg;
263 static int f_getowner_uids(struct file *filp, unsigned long arg)
285 unsigned long arg)
288 u64 __user *argp = (u64 __user *)arg;
330 static long do_fcntl(int fd, unsigned int cmd, unsigned long arg,
333 void __user *argp = (void __user *)arg;
339 err = f_dupfd(arg, filp, 0);
342 err = f_dupfd(arg, filp, O_CLOEXEC);
349 set_close_on_exec(fd, arg & FD_CLOEXEC);
355 err = setfl(fd, filp, arg);
392 err = f_setown(filp, arg, 1);
395 err = f_getown_ex(filp, arg);
398 err = f_setown_ex(filp, arg);
401 err = f_getowner_uids(filp, arg);
407 /* arg == 0 restores default behaviour. */
408 if (!valid_signal(arg)) {
412 filp->f_owner.signum = arg;
418 err = fcntl_setlease(fd, filp, arg);
421 err = fcntl_dirnotify(fd, filp, arg);
425 err = pipe_fcntl(filp, cmd, arg);
429 err = memfd_fcntl(filp, cmd, arg);
435 err = fcntl_rw_hint(filp, cmd, arg);
456 SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd, unsigned long, arg)
469 err = security_file_fcntl(f.file, cmd, arg);
471 err = do_fcntl(fd, cmd, arg, f.file);
481 unsigned long, arg)
483 void __user *argp = (void __user *)arg;
496 err = security_file_fcntl(f.file, cmd, arg);
520 err = do_fcntl(fd, cmd, arg, f.file);
619 compat_ulong_t arg)
633 err = security_file_fcntl(f.file, cmd, arg);
639 err = get_compat_flock(&flock, compat_ptr(arg));
647 err = put_compat_flock(&flock, compat_ptr(arg));
651 err = get_compat_flock64(&flock, compat_ptr(arg));
656 err = put_compat_flock64(&flock, compat_ptr(arg));
660 err = get_compat_flock(&flock, compat_ptr(arg));
669 err = get_compat_flock64(&flock, compat_ptr(arg));
675 err = do_fcntl(fd, cmd, arg, f.file);
684 compat_ulong_t, arg)
686 return do_compat_fcntl64(fd, cmd, arg);
690 compat_ulong_t, arg)
701 return do_compat_fcntl64(fd, cmd, arg);