Use delete_on_close for reply_unlink?

Jeremy Allison jra at samba.org
Tue Jun 12 17:10:35 GMT 2007


On Tue, Jun 12, 2007 at 04:22:29PM +0200, Volker Lendecke wrote:
> Hi, Jeremy!
> 
> The attached patch removes a little race condition for
> people with real kernel oplock support, and reduces some
> code paths. It changes reply_unlink to open_file_ntcreate,
> set_delete_on_close and close_file.
> 
> The race condition happens if we break the oplock in
> can_delete via open_file_ntcreate, we close the file,
> someone else gets a batch oplock and we try to unlink.
> 
> It reduces code paths by calling SMB_VFS_UNLINK in 2 fewer
> places.
> 
> Same would apply to rename_internal, but this seems a bit
> more involved.
> 
> What do you think?

Looks really good to me ! Nice work. I'm assuming it
passes all the torture tests - if it does please commit
in 3.0.26 and 3.0 (I don't think Jerry will want this
in 3.0.25b today :-).

Cheers,

	Jeremy.


More information about the samba-technical mailing list