提交 ec29ea54 编写于 作者: E Eric Paris 提交者: Al Viro

ima: valid return code from ima_inode_alloc

ima_inode_alloc returns 0 and 1, but the LSM hooks expects an errno.
Signed-off-by: NEric Paris <eparis@redhat.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 e81e3f4d
......@@ -87,8 +87,6 @@ struct ima_iint_cache *ima_iint_insert(struct inode *inode)
/**
* ima_inode_alloc - allocate an iint associated with an inode
* @inode: pointer to the inode
*
* Return 0 on success, 1 on failure.
*/
int ima_inode_alloc(struct inode *inode)
{
......@@ -99,7 +97,7 @@ int ima_inode_alloc(struct inode *inode)
iint = ima_iint_insert(inode);
if (!iint)
return 1;
return -ENOMEM;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册