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:
parent
d52f847a84
commit
a79832f26b
7 changed files with 48 additions and 80 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue