diff options
author | Sage Weil <sage@newdream.net> | 2009-12-07 12:17:17 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-12-07 12:17:17 -0800 |
commit | b6c1d5b81ea0841ae9d3ce2cda319ab986b081cf (patch) | |
tree | c7ddbaa1acdaec0704dfb0c1c539ddaf6e8c7506 /fs/ceph/messenger.c | |
parent | dd26d857a7bf1b5b734a23180c19eac3e46db944 (diff) | |
download | lwn-b6c1d5b81ea0841ae9d3ce2cda319ab986b081cf.tar.gz lwn-b6c1d5b81ea0841ae9d3ce2cda319ab986b081cf.zip |
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) BUG_ON(!middle_len); BUG_ON(msg->middle); - msg->middle = ceph_buffer_new_alloc(middle_len, GFP_NOFS); + msg->middle = ceph_buffer_new(middle_len, GFP_NOFS); if (!msg->middle) return -ENOMEM; return 0; |