Re: [PATCH] vfs: make real_lookup do dentry revalidation withi_mutex held

From: Christoph Hellwig
Date: Thu Mar 19 2009 - 15:33:16 EST


On Tue, Mar 17, 2009 at 10:03:35AM -0700, Sage Weil wrote:
> On Tue, 17 Mar 2009, Christoph Hellwig wrote:
> > Keeping i_mutes over do_revalidate seem fine from a first glance, but
> > can you please do it without rearranging the whole code?
>
> Yeah, but not without an extra goto. Holding i_mutex over revalidate is
> only half of it... we also want to go ahead with the ->lookup if the
> revalidate fails (instead of returning -ENOENT). I make the patch easier
> to read (with a goto), but I assumed we'd want the resulting code to be
> more clear?

Well, if you want to re-organize real_lookup make that a separate patch.
Might actually be worthwile to do so and clean up the other issues
in there (too long line in the prototype, spaces after the pointer *,
too. And then have a small patch ontop to implement the mutex and
going ahead with the lookup.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/