提交 5d314a81 编写于 作者: D Dan Carpenter 提交者: John Johansen

apparmor: Fix an error code in aafs_create()

We accidentally forgot to set the error code on this path.  It means we
return NULL instead of an error pointer.  I looked through a bunch of
callers and I don't think it really causes a big issue, but the
documentation says we're supposed to return error pointers here.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NSerge Hallyn <serge@hallyn.com>
Signed-off-by: NJohn Johansen <john.johansen@canonical.com>
上级 86aea56f
...@@ -248,8 +248,10 @@ static struct dentry *aafs_create(const char *name, umode_t mode, ...@@ -248,8 +248,10 @@ static struct dentry *aafs_create(const char *name, umode_t mode,
inode_lock(dir); inode_lock(dir);
dentry = lookup_one_len(name, parent, strlen(name)); dentry = lookup_one_len(name, parent, strlen(name));
if (IS_ERR(dentry)) if (IS_ERR(dentry)) {
error = PTR_ERR(dentry);
goto fail_lock; goto fail_lock;
}
if (d_really_is_positive(dentry)) { if (d_really_is_positive(dentry)) {
error = -EEXIST; error = -EEXIST;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册