diff options
author | Sage Weil <sage@newdream.net> | 2010-04-02 01:06:19 +0200 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-18 00:25:18 +0200 |
commit | a79832f26be370ee26ea81eecdfd42d10e49d66a (patch) | |
tree | 59d55f3c928558505a420830eddfb01b3186d467 /fs/ceph/caps.c | |
parent | ceph: rewrite msgpool using mempool_t (diff) | |
download | linux-a79832f26be370ee26ea81eecdfd42d10e49d66a.tar.xz linux-a79832f26be370ee26ea81eecdfd42d10e49d66a.zip |
ceph: make ceph_msg_new return NULL on failure; clean up, fix callers
Returning ERR_PTR(-ENOMEM) is useless extra work. Return NULL on failure
instead, and fix up the callers (about half of which were wrong anyway).
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 51fd39da1470..8755e2d83d4c 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -939,8 +939,8 @@ static int send_cap_msg(struct ceph_mds_session *session, xattr_version, xattrs_buf ? (int)xattrs_buf->vec.iov_len : 0); msg = ceph_msg_new(CEPH_MSG_CLIENT_CAPS, sizeof(*fc), 0, 0, NULL); - if (IS_ERR(msg)) - return PTR_ERR(msg); + if (!msg) + return -ENOMEM; msg->hdr.tid = cpu_to_le64(flush_tid); |