Re: [PATCH] vfs: make real_lookup do dentry revalidation with i_mutexheld

From: Sage Weil
Date: Tue Mar 10 2009 - 15:31:32 EST


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;
> }
> }
>
> Otherwise looks OK.

Good catch. Here is an updated patch (fixing the checkpatch error as
well).

Thanks!
sage

---