Lines Matching full:handle

24 	struct file_handle *handle = NULL;  in do_sys_name_to_handle()  local
28 * support decoding of the file handle in do_sys_name_to_handle()
40 handle = kmalloc(sizeof(struct file_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 connected 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()
64 * 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
88 * @handle->handle_size indicate the space available to store the
89 * variable part of the file handle in bytes. If there is not
94 struct file_handle __user *, handle, int __user *, mnt_id, in SYSCALL_DEFINE5()
109 err = do_sys_name_to_handle(&path, handle, mnt_id); in SYSCALL_DEFINE5()
139 static int do_handle_to_path(int mountdirfd, struct file_handle *handle, in do_handle_to_path() argument
150 /* change the handle size to multiple of sizeof(u32) */ in do_handle_to_path()
151 handle_dwords = handle->handle_bytes >> 2; in do_handle_to_path()
153 (struct fid *)handle->f_handle, in do_handle_to_path()
154 handle_dwords, handle->handle_type, in do_handle_to_path()
172 struct file_handle *handle = NULL; in handle_to_path() local
175 * With handle we don't look at the execute bit on the in handle_to_path()
192 handle = kmalloc(sizeof(struct file_handle) + f_handle.handle_bytes, in handle_to_path()
194 if (!handle) { in handle_to_path()
198 /* copy the full handle */ in handle_to_path()
199 *handle = f_handle; in handle_to_path()
200 if (copy_from_user(&handle->f_handle, in handle_to_path()
207 retval = do_handle_to_path(mountdirfd, handle, path); in handle_to_path()
210 kfree(handle); in handle_to_path()
246 * sys_open_by_handle_at: Open the file handle
248 * @handle: file handle to be opened
252 * of the mount point. file handle is decoded relative
257 struct file_handle __user *, handle, in SYSCALL_DEFINE3()
265 ret = do_handle_open(mountdirfd, handle, flags); in SYSCALL_DEFINE3()
275 struct file_handle __user *, handle, int, flags) in COMPAT_SYSCALL_DEFINE3()
277 return do_handle_open(mountdirfd, handle, flags); in COMPAT_SYSCALL_DEFINE3()