diff options
author | Sage Weil <sage@newdream.net> | 2009-12-07 15:17:17 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-12-07 15:17:17 -0500 |
commit | b6c1d5b81ea0841ae9d3ce2cda319ab986b081cf (patch) | |
tree | c7ddbaa1acdaec0704dfb0c1c539ddaf6e8c7506 /fs/ceph/messenger.c | |
parent | dd26d857a7bf1b5b734a23180c19eac3e46db944 (diff) |
ceph: simplify ceph_buffer interface
We never allocate the ceph_buffer and buffer separtely, so use a single
constructor.
Disallow put on NULL buffer; make the caller check.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/messenger.c')
-rw-r--r-- | fs/ceph/messenger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 45cec31fdf5e..bf762107b3d5 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c | |||
@@ -2047,7 +2047,7 @@ int ceph_alloc_middle(struct ceph_connection *con, struct ceph_msg *msg) | |||
2047 | BUG_ON(!middle_len); | 2047 | BUG_ON(!middle_len); |
2048 | BUG_ON(msg->middle); | 2048 | BUG_ON(msg->middle); |
2049 | 2049 | ||
2050 | msg->middle = ceph_buffer_new_alloc(middle_len, GFP_NOFS); | 2050 | msg->middle = ceph_buffer_new(middle_len, GFP_NOFS); |
2051 | if (!msg->middle) | 2051 | if (!msg->middle) |
2052 | return -ENOMEM; | 2052 | return -ENOMEM; |
2053 | return 0; | 2053 | return 0; |