[linux-cifs-client] Re: [PATCH 2/4] cifs: use common code for turning off ATTR_READONLY in cifs_unlink

Jeff Layton jlayton at redhat.com
Tue Sep 16 23:52:17 GMT 2008


On Tue, 16 Sep 2008 18:35:58 -0500
"Steve French" <smfrench at gmail.com> wrote:

> I will commit the patch to the cifs git development tree but wanted to
> consider things:
> 
> 1) your patch changes from open with FILE_WRITE_ATTRIBUTES to open with
> GENERIC_WRITE by calling cifs_set_file_info

Ahh ok. Just got the other mail. Yes, we could end up using a superset
of FILE_WRITE_ATTRIBUTES if we already have an open fh we can use. I'm
assuming that's OK (and preferred), but we could change it if we think
it would be a problem.

> 2) we should probably do the Open then RenameOpenFile whether or not the
> cifs_set_file_info fails

You mean that we should go ahead and do the silly_rename logic if the
first CIFSSMBDelOpenFile call returns -ETXTBSY or -EACCES? That's
probably reasonable and more efficient overall. It'll also mean less
complex logic too. I like this idea.

> 3) to remove the extern for a static in the c file, the function
> cifs_set_file_info should be moved forward in the file
> 

No objection here. I'll look at doing that.

Good observations all around. There's no huge hurry here, so let me
code up a respun set with some of these changes before you commit the
last 3. We might as well get it right the first time...

-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list