Lines Matching full:handle
25 struct file_handle *handle = NULL; in do_sys_name_to_handle() local
29 * the file handle if decodeable file handle was requested. in do_sys_name_to_handle()
40 handle = kzalloc(struct_size(handle, f_handle, f_handle.handle_bytes), in do_sys_name_to_handle()
42 if (!handle) in do_sys_name_to_handle()
45 /* convert handle size to multiple of sizeof(u32) */ in do_sys_name_to_handle()
48 /* we ask for a non connectable maybe decodeable file handle */ in do_sys_name_to_handle()
50 (struct fid *)handle->f_handle, in do_sys_name_to_handle()
52 handle->handle_type = retval; in do_sys_name_to_handle()
53 /* convert handle size to bytes */ in do_sys_name_to_handle()
55 handle->handle_bytes = handle_bytes; in do_sys_name_to_handle()
56 if ((handle->handle_bytes > f_handle.handle_bytes) || in do_sys_name_to_handle()
60 * But file system returned 255 always. So handle in do_sys_name_to_handle()
66 * set the handle size to zero so we copy only in do_sys_name_to_handle()
82 /* copy the handle */ in do_sys_name_to_handle()
84 copy_to_user(ufh, handle, in do_sys_name_to_handle()
85 struct_size(handle, f_handle, handle_bytes))) in do_sys_name_to_handle()
87 kfree(handle); in do_sys_name_to_handle()
92 * sys_name_to_handle_at: convert name to handle
94 * @name: name that should be converted to handle.
95 * @handle: resulting file handle
99 * and whether a decodable file handle is required.
101 * @handle->handle_size indicate the space available to store the
102 * variable part of the file handle in bytes. If there is not
107 struct file_handle __user *, handle, void __user *, mnt_id, in SYSCALL_DEFINE5()
125 err = do_sys_name_to_handle(&path, handle, mnt_id, in SYSCALL_DEFINE5()
216 static int do_handle_to_path(struct file_handle *handle, struct path *path, in do_handle_to_path() argument
222 /* change the handle size to multiple of sizeof(u32) */ in do_handle_to_path()
223 handle_dwords = handle->handle_bytes >> 2; in do_handle_to_path()
225 (struct fid *)handle->f_handle, in do_handle_to_path()
226 handle_dwords, handle->handle_type, in do_handle_to_path()
244 * the encoded file handle. If the caller is only able to create a
289 struct file_handle *handle = NULL; in handle_to_path() local
310 handle = kmalloc(struct_size(handle, f_handle, f_handle.handle_bytes), in handle_to_path()
312 if (!handle) { in handle_to_path()
316 /* copy the full handle */ in handle_to_path()
317 *handle = f_handle; in handle_to_path()
318 if (copy_from_user(&handle->f_handle, in handle_to_path()
325 retval = do_handle_to_path(handle, path, &ctx); in handle_to_path()
328 kfree(handle); in handle_to_path()
365 * sys_open_by_handle_at: Open the file handle
367 * @handle: file handle to be opened
371 * of the mount point. file handle is decoded relative
376 struct file_handle __user *, handle, in SYSCALL_DEFINE3()
384 ret = do_handle_open(mountdirfd, handle, flags); in SYSCALL_DEFINE3()
394 struct file_handle __user *, handle, int, flags) in COMPAT_SYSCALL_DEFINE3()
396 return do_handle_open(mountdirfd, handle, flags); in COMPAT_SYSCALL_DEFINE3()