Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331695
b: refs/heads/master
c: 457712a
h: refs/heads/master
i:
  331693: fed2b3a
  331691: 041967e
  331687: 9fa3c4d
  331679: 6106380
v: v3
  • Loading branch information
Sage Weil authored and Alex Elder committed Oct 3, 2012
1 parent 0aac7ec commit cbd8a2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6cae3717cddaf8e5e96e304733dca66e40d56f89
refs/heads/master: 457712a0bc5389b75d2c93840a684fd77df2aabb
8 changes: 6 additions & 2 deletions trunk/fs/ceph/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,18 @@ static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg)
u64 tmp;
struct ceph_object_layout ol;
struct ceph_pg pgid;
int r;

/* copy and validate */
if (copy_from_user(&dl, arg, sizeof(dl)))
return -EFAULT;

down_read(&osdc->map_sem);
ceph_calc_file_object_mapping(&ci->i_layout, dl.file_offset, &len,
&dl.object_no, &dl.object_offset, &olen);
r = ceph_calc_file_object_mapping(&ci->i_layout, dl.file_offset, &len,
&dl.object_no, &dl.object_offset,
&olen);
if (r < 0)
return -EIO;
dl.file_offset -= dl.object_offset;
dl.object_size = ceph_file_layout_object_size(ci->i_layout);
dl.block_size = ceph_file_layout_su(ci->i_layout);
Expand Down

0 comments on commit cbd8a2b

Please sign in to comment.