]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix btrfs_compat_ioctl failures on non-compat ioctls
authorJeff Mahoney <jeffm@suse.com>
Tue, 7 Feb 2017 00:39:09 +0000 (19:39 -0500)
committerDavid Sterba <dsterba@suse.com>
Wed, 8 Feb 2017 16:47:30 +0000 (17:47 +0100)
commitdd11958eee0c6e33b1ffd03dfa4894ba26e7b6cd
treea82a639c63ee3a78259c9ee909d19c2c48d9d3d3
parent4884711e206e417c4f65d34e3d99bc39a842d3ce
btrfs: fix btrfs_compat_ioctl failures on non-compat ioctls

Commit 60adf977e66 incorrectly assumed that returning -ENOIOCTLCMD would
cause the native ioctl to be called.  The ->compat_ioctl callback is
expected to handle all ioctls, not just compat variants.  As a result,
when using 32-bit userspace on 64-bit kernels, everything except those
three ioctls would return -ENOTTY.

Fixes: 60adf977e66 ("btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl")
Cc: stable@vger.kernel.org
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c