Lines Matching full:handle
24 struct file_handle *handle = NULL; in do_sys_name_to_handle() local
28 * the file handle if decodeable file handle was requested. in do_sys_name_to_handle()
43 handle = kzalloc(struct_size(handle, f_handle, f_handle.handle_bytes), in do_sys_name_to_handle()
45 if (!handle) in do_sys_name_to_handle()
48 /* convert handle size to multiple of sizeof(u32) */ in do_sys_name_to_handle()
51 /* we ask for a non connectable maybe decodeable file handle */ in do_sys_name_to_handle()
53 (struct fid *)handle->f_handle, in do_sys_name_to_handle()
55 handle->handle_type = retval; in do_sys_name_to_handle()
56 /* convert handle size to bytes */ in do_sys_name_to_handle()
58 handle->handle_bytes = handle_bytes; in do_sys_name_to_handle()
59 if ((handle->handle_bytes > f_handle.handle_bytes) || in do_sys_name_to_handle()
63 * But file system returned 255 always. So handle in do_sys_name_to_handle()
69 * set the handle size to zero so we copy only in do_sys_name_to_handle()
77 copy_to_user(ufh, handle, in do_sys_name_to_handle()
78 struct_size(handle, f_handle, handle_bytes))) in do_sys_name_to_handle()
80 kfree(handle); in do_sys_name_to_handle()
85 * sys_name_to_handle_at: convert name to handle
87 * @name: name that should be converted to handle.
88 * @handle: resulting file handle
91 * and whether a decodable file handle is required.
93 * @handle->handle_size indicate the space available to store the
94 * variable part of the file handle in bytes. If there is not
99 struct file_handle __user *, handle, int __user *, mnt_id, in SYSCALL_DEFINE5()
116 err = do_sys_name_to_handle(&path, handle, mnt_id, fh_flags); in SYSCALL_DEFINE5()
146 static int do_handle_to_path(int mountdirfd, struct file_handle *handle, in do_handle_to_path() argument
157 /* change the handle size to multiple of sizeof(u32) */ in do_handle_to_path()
158 handle_dwords = handle->handle_bytes >> 2; in do_handle_to_path()
160 (struct fid *)handle->f_handle, in do_handle_to_path()
161 handle_dwords, handle->handle_type, in do_handle_to_path()
179 struct file_handle *handle = NULL; in handle_to_path() local
182 * With handle we don't look at the execute bit on the in handle_to_path()
199 handle = kmalloc(struct_size(handle, f_handle, f_handle.handle_bytes), in handle_to_path()
201 if (!handle) { in handle_to_path()
205 /* copy the full handle */ in handle_to_path()
206 *handle = f_handle; in handle_to_path()
207 if (copy_from_user(&handle->f_handle, in handle_to_path()
214 retval = do_handle_to_path(mountdirfd, handle, path); in handle_to_path()
217 kfree(handle); in handle_to_path()
252 * sys_open_by_handle_at: Open the file handle
254 * @handle: file handle to be opened
258 * of the mount point. file handle is decoded relative
263 struct file_handle __user *, handle, in SYSCALL_DEFINE3()
271 ret = do_handle_open(mountdirfd, handle, flags); in SYSCALL_DEFINE3()
281 struct file_handle __user *, handle, int, flags) in COMPAT_SYSCALL_DEFINE3()
283 return do_handle_open(mountdirfd, handle, flags); in COMPAT_SYSCALL_DEFINE3()