Lines Matching defs:arg
1377 static void lease_clear_pending(struct file_lock *fl, int arg)
1379 switch (arg) {
1389 int lease_modify(struct file_lock *fl, int arg, struct list_head *dispose)
1391 int error = assign_type(fl, arg);
1395 lease_clear_pending(fl, arg);
1397 if (arg == F_UNLCK) {
1677 * @arg: type of lease that we're trying to acquire
1684 check_conflicting_open(struct file *filp, const int arg, int flags)
1695 if (arg == F_RDLCK)
1697 else if (arg != F_WRLCK)
1719 generic_add_lease(struct file *filp, int arg, struct file_lock **flp, void **priv)
1731 /* Note that arg is never F_UNLCK here */
1732 ctx = locks_get_lock_context(inode, arg);
1750 error = check_conflicting_open(filp, arg, lease->fl_flags);
1774 if (arg == F_WRLCK)
1786 error = lease->fl_lmops->lm_change(lease, arg, &dispose);
1807 error = check_conflicting_open(filp, arg, lease->fl_flags);
1862 * @arg: type of lease to obtain
1870 int generic_setlease(struct file *filp, int arg, struct file_lock **flp,
1881 error = security_file_lock(filp, arg);
1885 switch (arg) {
1895 return generic_add_lease(filp, arg, flp, priv);
1917 setlease_notifier(int arg, struct file_lock *lease)
1919 if (arg != F_UNLCK)
1920 srcu_notifier_call_chain(&lease_notifier_chain, arg, lease);
1938 * @arg: type of lease to obtain
1953 vfs_setlease(struct file *filp, int arg, struct file_lock **lease, void **priv)
1956 setlease_notifier(arg, *lease);
1958 return filp->f_op->setlease(filp, arg, lease, priv);
1960 return generic_setlease(filp, arg, lease, priv);
1964 static int do_fcntl_add_lease(unsigned int fd, struct file *filp, int arg)
1970 fl = lease_alloc(filp, arg);
1981 error = vfs_setlease(filp, arg, &fl, (void **)&new);
1993 * @arg: type of lease to obtain
1999 int fcntl_setlease(unsigned int fd, struct file *filp, int arg)
2001 if (arg == F_UNLCK)
2003 return do_fcntl_add_lease(fd, filp, arg);