summaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.c
diff options
context:
space:
mode:
authorSage Weil2010-04-02 01:07:23 +0200
committerSage Weil2010-05-18 00:25:19 +0200
commitbb257664f748bcfc80715f85f70f0f560caec3b4 (patch)
tree0f03c628328082e660c6a60f6094cde478dadec9 /fs/ceph/mds_client.c
parentceph: make ceph_msg_new return NULL on failure; clean up, fix callers (diff)
downloadkernel-qcow2-linux-bb257664f748bcfc80715f85f70f0f560caec3b4.tar.gz
kernel-qcow2-linux-bb257664f748bcfc80715f85f70f0f560caec3b4.tar.xz
kernel-qcow2-linux-bb257664f748bcfc80715f85f70f0f560caec3b4.zip
ceph: simplify ceph_msg_new
We only need to pass in front_len. Callers can attach any other payload pieces (middle, data) as they see fit. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r--fs/ceph/mds_client.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 7e89c185d38d..35dbdad07b1c 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -665,7 +665,7 @@ static struct ceph_msg *create_session_msg(u32 op, u64 seq)
struct ceph_msg *msg;
struct ceph_mds_session_head *h;
- msg = ceph_msg_new(CEPH_MSG_CLIENT_SESSION, sizeof(*h), 0, 0, NULL);
+ msg = ceph_msg_new(CEPH_MSG_CLIENT_SESSION, sizeof(*h));
if (!msg) {
pr_err("create_session_msg ENOMEM creating msg\n");
return NULL;
@@ -1051,8 +1051,7 @@ static int add_cap_releases(struct ceph_mds_client *mdsc,
while (session->s_num_cap_releases < session->s_nr_caps + extra) {
spin_unlock(&session->s_cap_lock);
- msg = ceph_msg_new(CEPH_MSG_CLIENT_CAPRELEASE, PAGE_CACHE_SIZE,
- 0, 0, NULL);
+ msg = ceph_msg_new(CEPH_MSG_CLIENT_CAPRELEASE, PAGE_CACHE_SIZE);
if (!msg)
goto out_unlocked;
dout("add_cap_releases %p msg %p now %d\n", session, msg,
@@ -1418,7 +1417,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc,
if (req->r_old_dentry_drop)
len += req->r_old_dentry->d_name.len;
- msg = ceph_msg_new(CEPH_MSG_CLIENT_REQUEST, len, 0, 0, NULL);
+ msg = ceph_msg_new(CEPH_MSG_CLIENT_REQUEST, len);
if (!msg) {
msg = ERR_PTR(-ENOMEM);
goto out_free2;
@@ -2154,7 +2153,7 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc, int mds)
ceph_pagelist_init(pagelist);
err = -ENOMEM;
- reply = ceph_msg_new(CEPH_MSG_CLIENT_RECONNECT, 0, 0, 0, NULL);
+ reply = ceph_msg_new(CEPH_MSG_CLIENT_RECONNECT, 0);
if (!reply)
goto fail_nomsg;
@@ -2462,7 +2461,7 @@ void ceph_mdsc_lease_send_msg(struct ceph_mds_session *session,
dnamelen = dentry->d_name.len;
len += dnamelen;
- msg = ceph_msg_new(CEPH_MSG_CLIENT_LEASE, len, 0, 0, NULL);
+ msg = ceph_msg_new(CEPH_MSG_CLIENT_LEASE, len);
if (!msg)
return;
lease = msg->front.iov_base;