diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2014-04-26 21:17:45 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2014-04-28 15:55:41 -0400 |
commit | 3bd58143bafc56dbc07f4f085e4d7e018d332674 (patch) | |
tree | 46957a1a015cd412677851bc426fbdb92e92113b /fs/ceph/ioctl.c | |
parent | fd7b95cd1b58171a0b931b2063729a032bec4ac2 (diff) |
ceph: reserve caps for file layout/lock MDS requests
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs/ceph/ioctl.c')
-rw-r--r-- | fs/ceph/ioctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c index efbe08289292..2042fd16d1a8 100644 --- a/fs/ceph/ioctl.c +++ b/fs/ceph/ioctl.c | |||
@@ -110,6 +110,8 @@ static long ceph_ioctl_set_layout(struct file *file, void __user *arg) | |||
110 | return PTR_ERR(req); | 110 | return PTR_ERR(req); |
111 | req->r_inode = inode; | 111 | req->r_inode = inode; |
112 | ihold(inode); | 112 | ihold(inode); |
113 | req->r_num_caps = 1; | ||
114 | |||
113 | req->r_inode_drop = CEPH_CAP_FILE_SHARED | CEPH_CAP_FILE_EXCL; | 115 | req->r_inode_drop = CEPH_CAP_FILE_SHARED | CEPH_CAP_FILE_EXCL; |
114 | 116 | ||
115 | req->r_args.setlayout.layout.fl_stripe_unit = | 117 | req->r_args.setlayout.layout.fl_stripe_unit = |
@@ -154,6 +156,7 @@ static long ceph_ioctl_set_layout_policy (struct file *file, void __user *arg) | |||
154 | return PTR_ERR(req); | 156 | return PTR_ERR(req); |
155 | req->r_inode = inode; | 157 | req->r_inode = inode; |
156 | ihold(inode); | 158 | ihold(inode); |
159 | req->r_num_caps = 1; | ||
157 | 160 | ||
158 | req->r_args.setlayout.layout.fl_stripe_unit = | 161 | req->r_args.setlayout.layout.fl_stripe_unit = |
159 | cpu_to_le32(l.stripe_unit); | 162 | cpu_to_le32(l.stripe_unit); |