+ vfs-make-real_lookup-do-dentry-revalidation-with-i_mutex-held-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     vfs-make-real_lookup-do-dentry-revalidation-with-i_mutex-held-fix
has been added to the -mm tree.  Its filename is
     vfs-make-real_lookup-do-dentry-revalidation-with-i_mutex-held-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: vfs-make-real_lookup-do-dentry-revalidation-with-i_mutex-held-fix
From: Sage Weil <sage@xxxxxxxxxxxx>

On Tue, 10 Mar 2009, Miklos Szeredi wrote:

> The patch is wrong in case ->d_revalidate is NULL.
>
> Something like this should fix it up:
>
> Index: linux-2.6/fs/namei.c
> ===================================================================
> --- linux-2.6.orig/fs/namei.c	2009-03-10 20:03:58.000000000 +0100
> +++ linux-2.6/fs/namei.c	2009-03-10 20:19:29.000000000 +0100
> @@ -501,6 +501,8 @@ static struct dentry * real_lookup(struc
>  			 * The dentry was left behind invalid.  Just
>  			 * do the lookup.
>  			 */
> +		} else {
> +			goto out_unlock;
>  		}
>  	}
>

Signed-off-by: Yehuda Sadeh <yehuda@xxxxxxxxxxxx>
Signed-off-by: Sage Weil <sage@xxxxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Andreas Dilger <adilger@xxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
Cc: Miklos Szeredi <miklos@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/namei.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff -puN fs/namei.c~vfs-make-real_lookup-do-dentry-revalidation-with-i_mutex-held-fix fs/namei.c
--- a/fs/namei.c~vfs-make-real_lookup-do-dentry-revalidation-with-i_mutex-held-fix
+++ a/fs/namei.c
@@ -502,6 +502,8 @@ static struct dentry * real_lookup(struc
 			 * The dentry was left behind invalid.  Just
 			 * do the lookup.
 			 */
+		} else {
+			goto out_unlock;
 		}
 	}
 
@@ -514,9 +516,9 @@ static struct dentry * real_lookup(struc
 	result = ERR_PTR(-ENOMEM);
 	if (dentry) {
 		result = dir->i_op->lookup(dir, dentry, nd);
-		if (result) {
+		if (result)
 			dput(dentry);
-		} else
+		else
 			result = dentry;
 	}
 out_unlock:
_

Patches currently in -mm which might be from sage@xxxxxxxxxxxx are

vfs-fix-vfs_rename_dir-for-fs_rename_does_d_move-filesystems.patch
vfs-make-real_lookup-do-dentry-revalidation-with-i_mutex-held.patch
vfs-make-real_lookup-do-dentry-revalidation-with-i_mutex-held-fix.patch
vfs-make-real_lookup-do-dentry-revalidation-with-i_mutex-held-checkpatch-fixes.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux