X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=fs%2Ffhandle.c;h=710438a1e0219f452434c8559798ea9bff9e5bbc;hp=6b088641f5bf24ce72311a3b8073ce44516b8624;hb=950c0f06dd3617fd1da39d2fb28dfc5acdc7f2ce;hpb=ea77f7a2e8561012cf100c530170f12351c3b53e diff --git a/fs/fhandle.c b/fs/fhandle.c index 6b088641f5bf..710438a1e021 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; @@ -228,7 +229,7 @@ long do_handle_open(int mountdirfd, path_put(&path); return fd; } - file = file_open_root(path.dentry, path.mnt, "", open_flag); + file = file_open_root(path.dentry, path.mnt, "", open_flag, 0); if (IS_ERR(file)) { put_unused_fd(fd); retval = PTR_ERR(file);