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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user