|
@@ -2930,11 +2930,13 @@ static long btrfs_ioctl_ino_to_path(struct btrfs_root *root, void __user *arg)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
for (i = 0; i < ipath->fspath->elem_cnt; ++i) {
|
|
for (i = 0; i < ipath->fspath->elem_cnt; ++i) {
|
|
- rel_ptr = ipath->fspath->val[i] - (u64)ipath->fspath->val;
|
|
|
|
|
|
+ rel_ptr = ipath->fspath->val[i] -
|
|
|
|
+ (u64)(unsigned long)ipath->fspath->val;
|
|
ipath->fspath->val[i] = rel_ptr;
|
|
ipath->fspath->val[i] = rel_ptr;
|
|
}
|
|
}
|
|
|
|
|
|
- ret = copy_to_user((void *)ipa->fspath, (void *)ipath->fspath, size);
|
|
|
|
|
|
+ ret = copy_to_user((void *)(unsigned long)ipa->fspath,
|
|
|
|
+ (void *)(unsigned long)ipath->fspath, size);
|
|
if (ret) {
|
|
if (ret) {
|
|
ret = -EFAULT;
|
|
ret = -EFAULT;
|
|
goto out;
|
|
goto out;
|
|
@@ -3017,7 +3019,8 @@ static long btrfs_ioctl_logical_to_ino(struct btrfs_root *root,
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
- ret = copy_to_user((void *)loi->inodes, (void *)inodes, size);
|
|
|
|
|
|
+ ret = copy_to_user((void *)(unsigned long)loi->inodes,
|
|
|
|
+ (void *)(unsigned long)inodes, size);
|
|
if (ret)
|
|
if (ret)
|
|
ret = -EFAULT;
|
|
ret = -EFAULT;
|
|
|
|
|