]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: Use compat_ptr in reflink_arguments.
authorTao Ma <tao.ma@oracle.com>
Wed, 27 Jan 2010 02:21:52 +0000 (10:21 +0800)
committerJoel Becker <joel.becker@oracle.com>
Wed, 3 Feb 2010 02:56:37 +0000 (18:56 -0800)
commit7fe4bf8b9bb6521cf4c98584be8c632bf4a11878
tree1b1199825cf9f658d1abd433ff0d6b0d9f22c1de
parentfbf1b174b1e2b55109562b0778559a06abd8edee
ocfs2: Use compat_ptr in reflink_arguments.

Although we use u64 to pass userspace pointers to the kernel
to avoid compat_ioctl, it doesn't work in some ppc platform.
So wrap them with compat_ptr and add compat_ioctl.

The detailed discussion about compat_ptr can be found in thread
http://lkml.org/lkml/2009/10/27/423.

We indeed met with a bug when testing on ppc(-EFAULT is returned
when using old_path). This patch try to fix this.
I have tested in ppc64(with 32 bit reflink) and x86_64(with i686
reflink), both works.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/ioctl.c