All of lore.kernel.org
 help / color / mirror / Atom feed
* Missing spin_lock(&dcache_lock)
@ 2010-01-11 11:52 Leonardo Chiquitto
  2010-01-12 14:17 ` Ian Kent
  0 siblings, 1 reply; 2+ messages in thread
From: Leonardo Chiquitto @ 2010-01-11 11:52 UTC (permalink / raw)
  To: autofs

Hello,

If I compare the 2.6.18 and 2.6.20 kernel trees after applying,
respectively, autofs4-2.6.18-v5-update-20090903.patch and
autofs4-2.6.20-v5-update-20090903.patch, I can understand most of the
differences, but this specific chunk seems strange to me:

diff -Nurp linux-2.6.18.8/fs/autofs4/root.c linux-2.6.20.21/fs/autofs4/root.c
--- linux-2.6.18.8/fs/autofs4/root.c	2010-01-08 13:34:35.000000000 -0200
+++ linux-2.6.20.21/fs/autofs4/root.c	2010-01-11 09:00:28.000000000 -0200
@@ -91,6 +91,7 @@ static int autofs4_dir_open(struct inode
 	 * autofs file system so just let the libfs routines handle
 	 * it.
 	 */
+	spin_lock(&dcache_lock);
 	if (!d_mountpoint(dentry) && __simple_empty(dentry)) {
 		spin_unlock(&dcache_lock);
 		return -ENOENT;

Was this line left out by mistake? If yes, can you please consider the patch
below?

Thanks,
Leonardo

Index: autofs/patches/autofs4-2.6.18-v5-update-20090903.patch
===================================================================
--- autofs.orig/patches/autofs4-2.6.18-v5-update-20090903.patch
+++ autofs/patches/autofs4-2.6.18-v5-update-20090903.patch
@@ -103,6 +103,7 @@
 +	 * autofs file system so just let the libfs routines handle
 +	 * it.
 +	 */
++	spin_lock(&dcache_lock);
 +	if (!d_mountpoint(dentry) && __simple_empty(dentry)) {
  		spin_unlock(&dcache_lock);
 -
Index: autofs/patches/autofs4-2.6.19-v5-update-20090903.patch
===================================================================
--- autofs.orig/patches/autofs4-2.6.19-v5-update-20090903.patch
+++ autofs/patches/autofs4-2.6.19-v5-update-20090903.patch
@@ -1041,6 +1041,7 @@
 +	 * autofs file system so just let the libfs routines handle
 +	 * it.
 +	 */
++	spin_lock(&dcache_lock);
 +	if (!d_mountpoint(dentry) && __simple_empty(dentry)) {
  		spin_unlock(&dcache_lock);
 -

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Missing spin_lock(&dcache_lock)
  2010-01-11 11:52 Missing spin_lock(&dcache_lock) Leonardo Chiquitto
@ 2010-01-12 14:17 ` Ian Kent
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Kent @ 2010-01-12 14:17 UTC (permalink / raw)
  To: Leonardo Chiquitto; +Cc: autofs

On 01/11/2010 07:52 PM, Leonardo Chiquitto wrote:
> Hello,
> 
> If I compare the 2.6.18 and 2.6.20 kernel trees after applying,
> respectively, autofs4-2.6.18-v5-update-20090903.patch and
> autofs4-2.6.20-v5-update-20090903.patch, I can understand most of the
> differences, but this specific chunk seems strange to me:

Oops.

I'll have a look but, from memory, that lock should be present.

The back porting of changes to older kernels gets harder and more error
prone as time passes.

> 
> diff -Nurp linux-2.6.18.8/fs/autofs4/root.c linux-2.6.20.21/fs/autofs4/root.c
> --- linux-2.6.18.8/fs/autofs4/root.c	2010-01-08 13:34:35.000000000 -0200
> +++ linux-2.6.20.21/fs/autofs4/root.c	2010-01-11 09:00:28.000000000 -0200
> @@ -91,6 +91,7 @@ static int autofs4_dir_open(struct inode
>  	 * autofs file system so just let the libfs routines handle
>  	 * it.
>  	 */
> +	spin_lock(&dcache_lock);
>  	if (!d_mountpoint(dentry) && __simple_empty(dentry)) {
>  		spin_unlock(&dcache_lock);
>  		return -ENOENT;
> 
> Was this line left out by mistake? If yes, can you please consider the patch
> below?
> 
> Thanks,
> Leonardo
> 
> Index: autofs/patches/autofs4-2.6.18-v5-update-20090903.patch
> ===================================================================
> --- autofs.orig/patches/autofs4-2.6.18-v5-update-20090903.patch
> +++ autofs/patches/autofs4-2.6.18-v5-update-20090903.patch
> @@ -103,6 +103,7 @@
>  +	 * autofs file system so just let the libfs routines handle
>  +	 * it.
>  +	 */
> ++	spin_lock(&dcache_lock);
>  +	if (!d_mountpoint(dentry) && __simple_empty(dentry)) {
>   		spin_unlock(&dcache_lock);
>  -
> Index: autofs/patches/autofs4-2.6.19-v5-update-20090903.patch
> ===================================================================
> --- autofs.orig/patches/autofs4-2.6.19-v5-update-20090903.patch
> +++ autofs/patches/autofs4-2.6.19-v5-update-20090903.patch
> @@ -1041,6 +1041,7 @@
>  +	 * autofs file system so just let the libfs routines handle
>  +	 * it.
>  +	 */
> ++	spin_lock(&dcache_lock);
>  +	if (!d_mountpoint(dentry) && __simple_empty(dentry)) {
>   		spin_unlock(&dcache_lock);
>  -
> 
> _______________________________________________
> autofs mailing list
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-12 14:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11 11:52 Missing spin_lock(&dcache_lock) Leonardo Chiquitto
2010-01-12 14:17 ` Ian Kent

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.