lkml.org 
[lkml]   [2010]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: [PATCH 01/34] VFS: Make clone_mnt() and copy_tree() return error codes
    Date
    collect_mounts() now also returns error pointers instead of NULL upon
    failure:

    diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
    index 46a57b5..898da28 100644
    --- a/kernel/audit_tree.c
    +++ b/kernel/audit_tree.c
    @@ -579,7 +579,7 @@ void audit_trim_trees(void)

    root_mnt = collect_mounts(&path);
    path_put(&path);
    - if (!root_mnt)
    + if (IS_ERR(root_mnt))
    goto skip_it;

    spin_lock(&hash_lock);
    @@ -651,8 +651,8 @@ int audit_add_tree_rule(struct audit_krule *rule)
    goto Err;
    mnt = collect_mounts(&path);
    path_put(&path);
    - if (!mnt) {
    - err = -ENOMEM;
    + if (IS_ERR(mnt)) {
    + err = PTR_ERR(mnt);
    goto Err;
    }

    @@ -701,8 +701,8 @@ int audit_tag_tree(char *old, char *new)
    return err;
    tagged = collect_mounts(&path2);
    path_put(&path2);
    - if (!tagged)
    - return -ENOMEM;
    + if (IS_ERR(tagged))
    + return PTR_ERR(tagged);

    err = kern_path(old, 0, &path1);
    if (err) {
    --
    1.7.3.rc2

    \
     
     \ /
      Last update: 2010-09-20 23:29    [W:5.859 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site