diff options
author | Sage Weil <sage@newdream.net> | 2010-04-01 16:07:23 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-17 15:25:19 -0700 |
commit | bb257664f748bcfc80715f85f70f0f560caec3b4 (patch) | |
tree | 0f03c628328082e660c6a60f6094cde478dadec9 /fs/ceph/mds_client.c | |
parent | a79832f26be370ee26ea81eecdfd42d10e49d66a (diff) | |
download | lwn-bb257664f748bcfc80715f85f70f0f560caec3b4.tar.gz lwn-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.c | 11 |
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; |