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>
This commit is contained in:
Sage Weil
2010-04-01 16:06:19 -07:00
parent d52f847a84
commit a79832f26b
7 changed files with 48 additions and 80 deletions

View File

@@ -649,8 +649,8 @@ more:
do_sync,
ci->i_truncate_seq, ci->i_truncate_size,
&mtime, false, 2);
if (IS_ERR(req))
return PTR_ERR(req);
if (!req)
return -ENOMEM;
num_pages = calc_pages_for(pos, len);