Lines Matching refs:cmd
280 static long fcntl_rw_hint(struct file *file, unsigned int cmd, in fcntl_rw_hint() argument
287 switch (cmd) { in fcntl_rw_hint()
308 static long do_fcntl(int fd, unsigned int cmd, unsigned long arg, in do_fcntl() argument
316 switch (cmd) { in do_fcntl()
343 err = fcntl_getlk(filp, cmd, &flock); in do_fcntl()
357 err = fcntl_setlk(fd, filp, cmd, &flock); in do_fcntl()
404 err = pipe_fcntl(filp, cmd, argi); in do_fcntl()
408 err = memfd_fcntl(filp, cmd, argi); in do_fcntl()
412 err = fcntl_rw_hint(filp, cmd, arg); in do_fcntl()
420 static int check_fcntl_cmd(unsigned cmd) in check_fcntl_cmd() argument
422 switch (cmd) { in check_fcntl_cmd()
433 SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) in SYSCALL_DEFINE3() argument
442 if (!check_fcntl_cmd(cmd)) in SYSCALL_DEFINE3()
446 err = security_file_fcntl(f.file, cmd, arg); in SYSCALL_DEFINE3()
448 err = do_fcntl(fd, cmd, arg, f.file); in SYSCALL_DEFINE3()
457 SYSCALL_DEFINE3(fcntl64, unsigned int, fd, unsigned int, cmd, in SYSCALL_DEFINE3() argument
469 if (!check_fcntl_cmd(cmd)) in SYSCALL_DEFINE3()
473 err = security_file_fcntl(f.file, cmd, arg); in SYSCALL_DEFINE3()
477 switch (cmd) { in SYSCALL_DEFINE3()
483 err = fcntl_getlk64(f.file, cmd, &flock); in SYSCALL_DEFINE3()
494 err = fcntl_setlk64(fd, f.file, cmd, &flock); in SYSCALL_DEFINE3()
497 err = do_fcntl(fd, cmd, arg, f.file); in SYSCALL_DEFINE3()
563 convert_fcntl_cmd(unsigned int cmd) in convert_fcntl_cmd() argument
565 switch (cmd) { in convert_fcntl_cmd()
574 return cmd; in convert_fcntl_cmd()
595 static long do_compat_fcntl64(unsigned int fd, unsigned int cmd, in do_compat_fcntl64() argument
606 if (!check_fcntl_cmd(cmd)) in do_compat_fcntl64()
610 err = security_file_fcntl(f.file, cmd, arg); in do_compat_fcntl64()
614 switch (cmd) { in do_compat_fcntl64()
619 err = fcntl_getlk(f.file, convert_fcntl_cmd(cmd), &flock); in do_compat_fcntl64()
631 err = fcntl_getlk(f.file, convert_fcntl_cmd(cmd), &flock); in do_compat_fcntl64()
640 err = fcntl_setlk(fd, f.file, convert_fcntl_cmd(cmd), &flock); in do_compat_fcntl64()
649 err = fcntl_setlk(fd, f.file, convert_fcntl_cmd(cmd), &flock); in do_compat_fcntl64()
652 err = do_fcntl(fd, cmd, arg, f.file); in do_compat_fcntl64()
660 COMPAT_SYSCALL_DEFINE3(fcntl64, unsigned int, fd, unsigned int, cmd, in COMPAT_SYSCALL_DEFINE3() argument
663 return do_compat_fcntl64(fd, cmd, arg); in COMPAT_SYSCALL_DEFINE3()
666 COMPAT_SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd, in COMPAT_SYSCALL_DEFINE3() argument
669 switch (cmd) { in COMPAT_SYSCALL_DEFINE3()
678 return do_compat_fcntl64(fd, cmd, arg); in COMPAT_SYSCALL_DEFINE3()