summaryrefslogtreecommitdiffstats
path: root/fs/ceph/ioctl.c
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2014-04-27 09:17:45 +0800
committerSage Weil <sage@inktank.com>2014-04-28 12:55:41 -0700
commit3bd58143bafc56dbc07f4f085e4d7e018d332674 (patch)
tree46957a1a015cd412677851bc426fbdb92e92113b /fs/ceph/ioctl.c
parentfd7b95cd1b58171a0b931b2063729a032bec4ac2 (diff)
downloadop-kernel-dev-3bd58143bafc56dbc07f4f085e4d7e018d332674.zip
op-kernel-dev-3bd58143bafc56dbc07f4f085e4d7e018d332674.tar.gz
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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c
index efbe082..2042fd1 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)
return PTR_ERR(req);
req->r_inode = inode;
ihold(inode);
+ req->r_num_caps = 1;
+
req->r_inode_drop = CEPH_CAP_FILE_SHARED | CEPH_CAP_FILE_EXCL;
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)
return PTR_ERR(req);
req->r_inode = inode;
ihold(inode);
+ req->r_num_caps = 1;
req->r_args.setlayout.layout.fl_stripe_unit =
cpu_to_le32(l.stripe_unit);
OpenPOWER on IntegriCloud