aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-01-16 11:59:08 -0500
committerChris Mason <chris.mason@oracle.com>2009-01-16 11:59:08 -0500
commitc071fcfdb60e7abbe95e02460005d6bca165bf24 (patch)
tree2f7b32f7a554e03e012586ae429ea3bd2794fcb6 /fs/btrfs/super.c
parent1d9e2ae949411c2f329f30e01ea0355cd02c4296 (diff)
Btrfs: fix ioctl arg size (userland incompatible change!)
The structure used to send device in btrfs ioctl calls was not properly aligned, and so 32 bit ioctls would not work properly on 64 bit kernels. We could fix this with compat ioctls, but we're just one byte away and it doesn't make sense at this stage to carry about the compat ioctls forever at this stage in the project. This patch brings the ioctl arg up to an evenly aligned 4k. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index b4c101d9322c..92c9b543deff 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -582,7 +582,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
582{ 582{
583 struct btrfs_ioctl_vol_args *vol; 583 struct btrfs_ioctl_vol_args *vol;
584 struct btrfs_fs_devices *fs_devices; 584 struct btrfs_fs_devices *fs_devices;
585 int ret = 0; 585 int ret = -ENOTTY;
586 int len; 586 int len;
587 587
588 if (!capable(CAP_SYS_ADMIN)) 588 if (!capable(CAP_SYS_ADMIN))
@@ -594,6 +594,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
594 goto out; 594 goto out;
595 } 595 }
596 len = strnlen(vol->name, BTRFS_PATH_NAME_MAX); 596 len = strnlen(vol->name, BTRFS_PATH_NAME_MAX);
597
597 switch (cmd) { 598 switch (cmd) {
598 case BTRFS_IOC_SCAN_DEV: 599 case BTRFS_IOC_SCAN_DEV:
599 ret = btrfs_scan_one_device(vol->name, FMODE_READ, 600 ret = btrfs_scan_one_device(vol->name, FMODE_READ,