From: Liu Ping Fan <kernelfans@gmail.com>
To: linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH] pid: remove redundant condition
Date: Fri, 6 Apr 2012 14:16:29 +0800 [thread overview]
Message-ID: <1333692989-9230-1-git-send-email-kernelfans@gmail.com> (raw)
From: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
---
kernel/pid.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/kernel/pid.c b/kernel/pid.c
index 9f08dfa..e4ca244 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -248,8 +248,7 @@ void put_pid(struct pid *pid)
return;
ns = pid->numbers[pid->level].ns;
- if ((atomic_read(&pid->count) == 1) ||
- atomic_dec_and_test(&pid->count)) {
+ if (atomic_dec_and_test(&pid->count) {
kmem_cache_free(ns->pid_cachep, pid);
put_pid_ns(ns);
}
--
1.7.4.4
next reply other threads:[~2012-04-06 6:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-06 6:16 Liu Ping Fan [this message]
2012-04-06 6:26 ` [PATCH] pid: remove redundant condition Linus Torvalds
2012-04-06 8:33 ` Liu ping fan
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=1333692989-9230-1-git-send-email-kernelfans@gmail.com \
--to=kernelfans@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.