Lines Matching full:arg

69 static int bch2_ioc_getflags(struct bch_inode_info *inode, int __user *arg)  in bch2_ioc_getflags()  argument
73 return put_user(flags, arg); in bch2_ioc_getflags()
79 void __user *arg) in bch2_ioc_setflags() argument
85 if (get_user(uflags, (int __user *) arg)) in bch2_ioc_setflags()
115 struct fsxattr __user *arg) in bch2_ioc_fsgetxattr() argument
126 if (copy_to_user(arg, &fa, sizeof(fa))) in bch2_ioc_fsgetxattr()
150 struct fsxattr __user *arg) in bch2_ioc_fssetxattr() argument
156 if (copy_from_user(&fa, arg, sizeof(fa))) in bch2_ioc_fssetxattr()
275 static int bch2_ioc_goingdown(struct bch_fs *c, u32 __user *arg) in bch2_ioc_goingdown() argument
283 if (get_user(flags, arg)) in bch2_ioc_goingdown()
312 struct bch_ioctl_subvolume arg) in __bch2_ioctl_subvolume_create() argument
325 if (arg.flags & ~(BCH_SUBVOL_SNAPSHOT_CREATE| in __bch2_ioctl_subvolume_create()
329 if (!(arg.flags & BCH_SUBVOL_SNAPSHOT_CREATE) && in __bch2_ioctl_subvolume_create()
330 (arg.src_ptr || in __bch2_ioctl_subvolume_create()
331 (arg.flags & BCH_SUBVOL_SNAPSHOT_RO))) in __bch2_ioctl_subvolume_create()
334 if (arg.flags & BCH_SUBVOL_SNAPSHOT_CREATE) in __bch2_ioctl_subvolume_create()
337 if (arg.flags & BCH_SUBVOL_SNAPSHOT_RO) in __bch2_ioctl_subvolume_create()
340 if (arg.flags & BCH_SUBVOL_SNAPSHOT_CREATE) { in __bch2_ioctl_subvolume_create()
347 if (arg.src_ptr) { in __bch2_ioctl_subvolume_create()
348 error = user_path_at(arg.dirfd, in __bch2_ioctl_subvolume_create()
349 (const char __user *)(unsigned long)arg.src_ptr, in __bch2_ioctl_subvolume_create()
363 dst_dentry = user_path_create(arg.dirfd, in __bch2_ioctl_subvolume_create()
364 (const char __user *)(unsigned long)arg.dst_ptr, in __bch2_ioctl_subvolume_create()
399 arg.mode &= ~current_umask(); in __bch2_ioctl_subvolume_create()
401 error = security_path_mkdir(&dst_path, dst_dentry, arg.mode); in __bch2_ioctl_subvolume_create()
405 if ((arg.flags & BCH_SUBVOL_SNAPSHOT_CREATE) && in __bch2_ioctl_subvolume_create()
406 !arg.src_ptr) in __bch2_ioctl_subvolume_create()
410 dst_dentry, arg.mode|S_IFDIR, in __bch2_ioctl_subvolume_create()
421 if (arg.src_ptr) in __bch2_ioctl_subvolume_create()
433 struct bch_ioctl_subvolume arg) in bch2_ioctl_subvolume_create() argument
436 long ret = __bch2_ioctl_subvolume_create(c, filp, arg); in bch2_ioctl_subvolume_create()
443 struct bch_ioctl_subvolume arg) in bch2_ioctl_subvolume_destroy() argument
445 const char __user *name = (void __user *)(unsigned long)arg.dst_ptr; in bch2_ioctl_subvolume_destroy()
451 if (arg.flags) in bch2_ioctl_subvolume_destroy()
454 victim = user_path_locked_at(arg.dirfd, name, &path); in bch2_ioctl_subvolume_destroy()
479 long bch2_fs_file_ioctl(struct file *file, unsigned cmd, unsigned long arg) in bch2_fs_file_ioctl() argument
487 ret = bch2_ioc_getflags(inode, (int __user *) arg); in bch2_fs_file_ioctl()
491 ret = bch2_ioc_setflags(c, file, inode, (int __user *) arg); in bch2_fs_file_ioctl()
495 ret = bch2_ioc_fsgetxattr(inode, (void __user *) arg); in bch2_fs_file_ioctl()
500 (void __user *) arg); in bch2_fs_file_ioctl()
505 (void __user *) arg); in bch2_fs_file_ioctl()
517 ret = bch2_ioc_goingdown(c, (u32 __user *) arg); in bch2_fs_file_ioctl()
523 ret = copy_from_user(&i, (void __user *) arg, sizeof(i)) in bch2_fs_file_ioctl()
532 ret = copy_from_user(&i, (void __user *) arg, sizeof(i)) in bch2_fs_file_ioctl()
539 ret = bch2_fs_ioctl(c, cmd, (void __user *) arg); in bch2_fs_file_ioctl()
547 long bch2_compat_fs_ioctl(struct file *file, unsigned cmd, unsigned long arg) in bch2_compat_fs_ioctl() argument
560 return bch2_fs_file_ioctl(file, cmd, (unsigned long) compat_ptr(arg)); in bch2_compat_fs_ioctl()