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()
39 handle = kmalloc(sizeof(struct file_handle) + f_handle.handle_bytes, in do_sys_name_to_handle()
41 if (!handle) in do_sys_name_to_handle()
44 /* convert handle size to multiple of sizeof(u32) */ in do_sys_name_to_handle()
47 /* we ask for a non connectable maybe decodeable file handle */ in do_sys_name_to_handle()
49 (struct fid *)handle->f_handle, in do_sys_name_to_handle()
51 handle->handle_type = retval; in do_sys_name_to_handle()
52 /* convert handle size to bytes */ in do_sys_name_to_handle()
54 handle->handle_bytes = handle_bytes; in do_sys_name_to_handle()
55 if ((handle->handle_bytes > f_handle.handle_bytes) || in do_sys_name_to_handle()
59 * But file system returned 255 always. So handle in do_sys_name_to_handle()
65 * set the handle size to zero so we copy only in do_sys_name_to_handle()
73 copy_to_user(ufh, handle, in do_sys_name_to_handle()
76 kfree(handle); in do_sys_name_to_handle()
81 * sys_name_to_handle_at: convert name to handle
83 * @name: name that should be converted to handle.
84 * @handle: resulting file handle
87 * and whether a decodable file handle is required.
89 * @handle->handle_size indicate the space available to store the
90 * variable part of the file handle in bytes. If there is not
95 struct file_handle __user *, handle, int __user *, mnt_id, in SYSCALL_DEFINE5()
112 err = do_sys_name_to_handle(&path, handle, mnt_id, fh_flags); in SYSCALL_DEFINE5()
142 static int do_handle_to_path(int mountdirfd, struct file_handle *handle, in do_handle_to_path() argument
153 /* change the handle size to multiple of sizeof(u32) */ in do_handle_to_path()
154 handle_dwords = handle->handle_bytes >> 2; in do_handle_to_path()
156 (struct fid *)handle->f_handle, in do_handle_to_path()
157 handle_dwords, handle->handle_type, in do_handle_to_path()
175 struct file_handle *handle = NULL; in handle_to_path() local
178 * With handle we don't look at the execute bit on the in handle_to_path()
195 handle = kmalloc(sizeof(struct file_handle) + f_handle.handle_bytes, in handle_to_path()
197 if (!handle) { in handle_to_path()
201 /* copy the full handle */ in handle_to_path()
202 *handle = f_handle; in handle_to_path()
203 if (copy_from_user(&handle->f_handle, in handle_to_path()
210 retval = do_handle_to_path(mountdirfd, handle, path); in handle_to_path()
213 kfree(handle); in handle_to_path()
248 * sys_open_by_handle_at: Open the file handle
250 * @handle: file handle to be opened
254 * of the mount point. file handle is decoded relative
259 struct file_handle __user *, handle, in SYSCALL_DEFINE3()
267 ret = do_handle_open(mountdirfd, handle, flags); in SYSCALL_DEFINE3()
277 struct file_handle __user *, handle, int, flags) in COMPAT_SYSCALL_DEFINE3()
279 return do_handle_open(mountdirfd, handle, flags); in COMPAT_SYSCALL_DEFINE3()