...otherwise if pcd_associate fails due to out-of-memory, the caller of
do_tmem_put will think the call was successful.
While at it, fix up the style issue.
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Reviewed-by: Bob Liu <bob.liu@oracle.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
if ( tmem_dedup_enabled() && !is_persistent(pool) )
{
- if ( pcd_associate(pgp,NULL,0) == -ENOMEM )
+ if ( pcd_associate(pgp, NULL, 0) == -ENOMEM )
+ {
+ ret = -ENOMEM;
goto del_pgp_from_obj;
+ }
}
insert_page: