diff options
-rw-r--r-- | fs/fhandle.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/fhandle.c b/fs/fhandle.c index 6b088641f5b..c9e18f3ecc4 100644 --- a/fs/fhandle.c +++ b/fs/fhandle.c @@ -196,8 +196,9 @@ static int handle_to_path(int mountdirfd, struct file_handle __user *ufh, goto out_err; } /* copy the full handle */ - if (copy_from_user(handle, ufh, - sizeof(struct file_handle) + + *handle = f_handle; + if (copy_from_user(&handle->f_handle, + &ufh->f_handle, f_handle.handle_bytes)) { retval = -EFAULT; goto out_handle; |