mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: wzt wzt <wzt.wzt@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: zohar@us.ibm.com
Subject: [PATCH] security/integrity/ima/ima_iint.c: Remove goto out int  ima_inode_alloc()
Date: Mon, 8 Feb 2010 14:57:28 +0800	[thread overview]
Message-ID: <628d1651002072257m154de288y38158afe55ca1d07@mail.gmail.com> (raw)

Signed-off-by: wzt <zhitong.wangzt@alibaba-inc.com>

diff --git a/security/integrity/ima/ima_iint.c
b/security/integrity/ima/ima_iint.c
index 0d83edc..4e2df22 100644
--- a/security/integrity/ima/ima_iint.c
+++ b/security/integrity/ima/ima_iint.c
@@ -57,18 +57,17 @@ int ima_inode_alloc(struct inode *inode)
                return -ENOMEM;

        rc = radix_tree_preload(GFP_NOFS);
-       if (rc < 0)
-               goto out;
+       if (rc < 0) {
+               kmem_cache_free(iint_cache, iint);
+               radix_tree_preload_end();
+               return rc;
+       }

        spin_lock(&ima_iint_lock);
        rc = radix_tree_insert(&ima_iint_store, (unsigned long)inode, iint);
        spin_unlock(&ima_iint_lock);
-out:
-       if (rc < 0)
-               kmem_cache_free(iint_cache, iint);

        radix_tree_preload_end();
-
        return rc;
 }

             reply	other threads:[~2010-02-08  6:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08  6:57 wzt wzt [this message]
2010-02-08  7:08 ` Xiaotian Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=628d1651002072257m154de288y38158afe55ca1d07@mail.gmail.com \
    --to=wzt.wzt@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zohar@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®