OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] Remove unused member from nsproxy
[PATCH] Remove unused member from nsproxy [message #20806] Wed, 26 September 2007 13:14 Go to next message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
The nslock spinlock is not used in the kernel at all. 
Remove it.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---

diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index a3f2541..cae35b6 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -73,7 +73,6 @@ extern struct nsproxy init_nsproxy;
 #define INIT_NSPROXY(nsproxy) {						\
 	.pid_ns		= &init_pid_ns,					\
 	.count		= ATOMIC_INIT(1),				\
-	.nslock		= __SPIN_LOCK_UNLOCKED(nsproxy.nslock),		\
 	.uts_ns		= &init_uts_ns,					\
 	.mnt_ns		= NULL,						\
 	INIT_NET_NS(net_ns)                                             \
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h
index 4d564d8..0e66b57 100644
--- a/include/linux/nsproxy.h
+++ b/include/linux/nsproxy.h
@@ -23,7 +23,6 @@ struct pid_namespace;
  */
 struct nsproxy {
 	atomic_t count;
-	spinlock_t nslock;
 	struct uts_namespace *uts_ns;
 	struct ipc_namespace *ipc_ns;
 	struct mnt_namespace *mnt_ns;
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH] Remove unused member from nsproxy [message #20813 is a reply to message #20806] Wed, 26 September 2007 13:28 Go to previous messageGo to next message
serue is currently offline  serue
Messages: 750
Registered: February 2006
Senior Member
Quoting Pavel Emelyanov (xemul@openvz.org):
> The nslock spinlock is not used in the kernel at all. 
> Remove it.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Acked-by: Serge Hallyn <serue@us.ibm.com>

> ---
> 
> diff --git a/include/linux/init_task.h b/include/linux/init_task.h
> index a3f2541..cae35b6 100644
> --- a/include/linux/init_task.h
> +++ b/include/linux/init_task.h
> @@ -73,7 +73,6 @@ extern struct nsproxy init_nsproxy;
>  #define INIT_NSPROXY(nsproxy) {						\
>  	.pid_ns		= &init_pid_ns,					\
>  	.count		= ATOMIC_INIT(1),				\
> -	.nslock		= __SPIN_LOCK_UNLOCKED(nsproxy.nslock),		\
>  	.uts_ns		= &init_uts_ns,					\
>  	.mnt_ns		= NULL,						\
>  	INIT_NET_NS(net_ns)                                             \
> diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h
> index 4d564d8..0e66b57 100644
> --- a/include/linux/nsproxy.h
> +++ b/include/linux/nsproxy.h
> @@ -23,7 +23,6 @@ struct pid_namespace;
>   */
>  struct nsproxy {
>  	atomic_t count;
> -	spinlock_t nslock;
>  	struct uts_namespace *uts_ns;
>  	struct ipc_namespace *ipc_ns;
>  	struct mnt_namespace *mnt_ns;
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH] Remove unused member from nsproxy [message #20815 is a reply to message #20806] Wed, 26 September 2007 13:31 Go to previous messageGo to next message
Cedric Le Goater is currently offline  Cedric Le Goater
Messages: 443
Registered: February 2006
Senior Member
Pavel Emelyanov wrote:
> The nslock spinlock is not used in the kernel at all. 

it's also useless now that you have put some RCU rules around it.
right ? 

C.

> Remove it.
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
> 
> ---
> 
> diff --git a/include/linux/init_task.h b/include/linux/init_task.h
> index a3f2541..cae35b6 100644
> --- a/include/linux/init_task.h
> +++ b/include/linux/init_task.h
> @@ -73,7 +73,6 @@ extern struct nsproxy init_nsproxy;
>  #define INIT_NSPROXY(nsproxy) {						\
>  	.pid_ns		= &init_pid_ns,					\
>  	.count		= ATOMIC_INIT(1),				\
> -	.nslock		= __SPIN_LOCK_UNLOCKED(nsproxy.nslock),		\
>  	.uts_ns		= &init_uts_ns,					\
>  	.mnt_ns		= NULL,						\
>  	INIT_NET_NS(net_ns)                                             \
> diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h
> index 4d564d8..0e66b57 100644
> --- a/include/linux/nsproxy.h
> +++ b/include/linux/nsproxy.h
> @@ -23,7 +23,6 @@ struct pid_namespace;
>   */
>  struct nsproxy {
>  	atomic_t count;
> -	spinlock_t nslock;
>  	struct uts_namespace *uts_ns;
>  	struct ipc_namespace *ipc_ns;
>  	struct mnt_namespace *mnt_ns;
> _______________________________________________
> Containers mailing list
> Containers@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
> 

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH] Remove unused member from nsproxy [message #20818 is a reply to message #20815] Wed, 26 September 2007 13:37 Go to previous message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
Cedric Le Goater wrote:
> Pavel Emelyanov wrote:
>> The nslock spinlock is not used in the kernel at all. 
> 
> it's also useless now that you have put some RCU rules around it.
> right ? 

Exactly!

> C.
> 
>> Remove it.
>> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
>>
>> ---
>>
>> diff --git a/include/linux/init_task.h b/include/linux/init_task.h
>> index a3f2541..cae35b6 100644
>> --- a/include/linux/init_task.h
>> +++ b/include/linux/init_task.h
>> @@ -73,7 +73,6 @@ extern struct nsproxy init_nsproxy;
>>  #define INIT_NSPROXY(nsproxy) {						\
>>  	.pid_ns		= &init_pid_ns,					\
>>  	.count		= ATOMIC_INIT(1),				\
>> -	.nslock		= __SPIN_LOCK_UNLOCKED(nsproxy.nslock),		\
>>  	.uts_ns		= &init_uts_ns,					\
>>  	.mnt_ns		= NULL,						\
>>  	INIT_NET_NS(net_ns)                                             \
>> diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h
>> index 4d564d8..0e66b57 100644
>> --- a/include/linux/nsproxy.h
>> +++ b/include/linux/nsproxy.h
>> @@ -23,7 +23,6 @@ struct pid_namespace;
>>   */
>>  struct nsproxy {
>>  	atomic_t count;
>> -	spinlock_t nslock;
>>  	struct uts_namespace *uts_ns;
>>  	struct ipc_namespace *ipc_ns;
>>  	struct mnt_namespace *mnt_ns;
>> _______________________________________________
>> Containers mailing list
>> Containers@lists.linux-foundation.org
>> https://lists.linux-foundation.org/mailman/listinfo/containers
>>
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [RFC][PATCH] allow "unlimited" limit value.
Next Topic: [PATCH] Use KMEM_CACHE macro to create the nsproxy cache
Goto Forum:
  


Current Time: Mon Jul 15 15:11:30 GMT 2024

Total time taken to generate the page: 0.02354 seconds