提交 1dcab087 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

Staging: zcache: signedness bug in tmem_get()

"ret" needs to be signed for the error handling to work properly.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Acked-by: NDan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 c5f5c4db
...@@ -604,7 +604,7 @@ int tmem_get(struct tmem_pool *pool, struct tmem_oid *oidp, uint32_t index, ...@@ -604,7 +604,7 @@ int tmem_get(struct tmem_pool *pool, struct tmem_oid *oidp, uint32_t index,
struct tmem_obj *obj; struct tmem_obj *obj;
void *pampd; void *pampd;
bool ephemeral = is_ephemeral(pool); bool ephemeral = is_ephemeral(pool);
uint32_t ret = -1; int ret = -1;
struct tmem_hashbucket *hb; struct tmem_hashbucket *hb;
bool free = (get_and_free == 1) || ((get_and_free == 0) && ephemeral); bool free = (get_and_free == 1) || ((get_and_free == 0) && ephemeral);
bool lock_held = false; bool lock_held = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册