Re: [PATCH 1/6] prepare for write access checks: collapse if()

From: Christoph Hellwig
Date: Wed Aug 09 2006 - 13:06:45 EST

On Wed, Aug 09, 2006 at 09:57:30AM -0700, Dave Hansen wrote:
> We're shortly going to be adding a bunch more permission
> checks in these functions. That requires adding either a
> bunch of new if() conditions, or some gotos. This patch
> collapses existing if()s and uses gotos instead to
> prepare for the upcoming changes.
> Signed-off-by: Dave Hansen <haveblue@xxxxxxxxxx>

Acked-by: Christoph Hellwig <hch@xxxxxx>

> + res = vfs_permission(&nd, mode);
> + /* SuS v2 requires we report a read only fs too */
> + if(res || !(mode & S_IWOTH) ||

except that there's a space missing after the if here :)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at