[linux-cifs-client] Re: [PATCH 3/3] cifs: have cifs_create use POSIX create if it's available

Jeff Layton jlayton at redhat.com
Fri Feb 13 14:44:21 GMT 2009

On Wed, 11 Feb 2009 11:44:26 -0500
Jeff Layton <jlayton at redhat.com> wrote:

> > This is great, but wondering if the posix create code should be split out to
> > a different function - calling out early from cifs_create to a new
> > posix_create (when the server supports posix extensions) to reduce the size
> > of this (now) 250+ line cifs_create function (as I had done in my earlier
> > start on posix_create last month).
> > 
> Wouldn't hurt, though it may be a little while before I can get to it...

I had a look at doing this and I'm not convinced that you're really
going gain much from trying to break the posix create code into a
separate function. There are a lot of things that will need to be
passed back and forth so the argument list is going to be pretty long...

The thing that *would* probably help would be to unify cifs_create and
cifs_open. i.e., turn them into wrappers around a common function. That
would also probably make it easier to call that function from the
lookup like you suggested. I think though, that that would be better
suited to a separate cleanup patch.

Would it be reasonable to take this patch as-is now, and look at
unifying those routines later?
Jeff Layton <jlayton at redhat.com>

More information about the linux-cifs-client mailing list