提交 f819d837 编写于 作者: L Linda Knippers 提交者: Chris Mason

btrfsctl -A error code fixup

Send the error back to userland if the ioctl fails
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 3b96362c
...@@ -453,7 +453,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd, ...@@ -453,7 +453,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
{ {
struct btrfs_ioctl_vol_args *vol; struct btrfs_ioctl_vol_args *vol;
struct btrfs_fs_devices *fs_devices; struct btrfs_fs_devices *fs_devices;
int ret; int ret = 0;
int len; int len;
vol = kmalloc(sizeof(*vol), GFP_KERNEL); vol = kmalloc(sizeof(*vol), GFP_KERNEL);
...@@ -470,7 +470,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd, ...@@ -470,7 +470,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
} }
out: out:
kfree(vol); kfree(vol);
return 0; return ret;
} }
static void btrfs_write_super_lockfs(struct super_block *sb) static void btrfs_write_super_lockfs(struct super_block *sb)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册