btrfs: fix send ioctl on 32bit with 64bit kernel
authorJosef Bacik <josef@toxicpanda.com>
Wed, 27 Sep 2017 14:43:13 +0000 (10:43 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:27:59 +0000 (12:27 +0100)
commit2351f431f727223b4d82851ee8fc045bf51edd34
treeb44303a30a67acab41bb0a43f03e2b118fabf7ca
parent2b902dfc896ffab875842ed62820dca0b99ff461
btrfs: fix send ioctl on 32bit with 64bit kernel

We pass in a pointer in our send arg struct, this means the struct size
doesn't match with 32bit user space and 64bit kernel space.  Fix this by
adding a compat mode and doing the appropriate conversion.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ move structure to the beginning, next to receive 32bit compat ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c
fs/btrfs/send.c
fs/btrfs/send.h