lkml.org 
[lkml]   [2012]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] pid: remove redundant condition
Date
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


\
 
 \ /
  Last update: 2012-04-06 08:19    [W:0.043 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site