share mode lock held too long?

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Jul 12 18:25:32 GMT 2005

Hi, Tridge!

In case opendb_file_pending returns an error, I get the impression that the
lock on the share mode db is held too long. Neither in pvfs_open_setup_retry
nor the return path in pvfs_open I don't see the necessary talloc_free(lck).

Is the following patch correct?


Index: ntvfs/posix/pvfs_open.c
--- ntvfs/posix/pvfs_open.c	(Revision 8354)
+++ ntvfs/posix/pvfs_open.c	(Arbeitskopie)
@@ -821,11 +821,11 @@
 	/* setup a pending lock */
 	status = odb_open_file_pending(lck, r);
+	talloc_free(lck);
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;
-	talloc_free(lck);
 	talloc_set_destructor(r, pvfs_retry_destructor);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the samba-technical mailing list