[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Sat Jun 9 10:51:06 MDT 2012
The branch, master has been updated
via 7256405 s3:smb2_write: pass fsp->fnum to init_strict_lock_struct()
via 0d77585 s3:smb2_read: pass fsp->fnum to init_strict_lock_struct()
via 4ae96bb s3:smb2_lock: use fsp->fnum as locking context
via 3b2e592 s3:smb2_lock: use smb2req->compat_chain_fsp instead of looking it up again
via 163207a s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()
from 3dbfb25 s3:smb2_close: add missing TALLOC_FREE(subreq) in smbd_smb2_request_close_done()
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 72564052b60c2043f520721e45705c40a2381905
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Jun 8 11:19:00 2012 +0200
s3:smb2_write: pass fsp->fnum to init_strict_lock_struct()
fsp->fnum is the same as in_file_id_volatile.
When we start to support durable handles we should pass
in_file_id_persistent.
metze
Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(master): Sat Jun 9 18:50:32 CEST 2012 on sn-devel-104
commit 0d77585a4197783ab8b0f8cb854eddd1e9b7941b
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Jun 8 11:19:00 2012 +0200
s3:smb2_read: pass fsp->fnum to init_strict_lock_struct()
fsp->fnum is the same as in_file_id_volatile.
When we start to support durable handles we should pass
in_file_id_persistent.
metze
commit 4ae96bb952be47a5043d9906da57a9482e12c21d
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Jun 8 11:19:00 2012 +0200
s3:smb2_lock: use fsp->fnum as locking context
fsp->fnum is the same as in_file_id_volatile.
When we start to support durable handles we should pass
in_file_id_persistent.
metze
commit 3b2e5929eca008dd6ad2f6ab5436eeb55ab69607
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Jun 8 12:05:56 2012 +0200
s3:smb2_lock: use smb2req->compat_chain_fsp instead of looking it up again
metze
commit 163207a28eb81f844070c5e87b6c0061d2fcc702
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat Jun 9 11:09:25 2012 +0200
s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()
metze
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/files.c | 3 +++
source3/smbd/smb2_lock.c | 9 ++-------
source3/smbd/smb2_read.c | 4 ++--
source3/smbd/smb2_write.c | 2 +-
4 files changed, 8 insertions(+), 10 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index c0ebb98..1fe5596 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -574,6 +574,9 @@ files_struct *file_fsp(struct smb_request *req, uint16 fid)
fsp = file_fnum(req->sconn, fid);
if (fsp != NULL) {
req->chain_fsp = fsp;
+ if (req->smb2req != NULL) {
+ req->smb2req->compat_chain_fsp = fsp;
+ }
}
return fsp;
}
diff --git a/source3/smbd/smb2_lock.c b/source3/smbd/smb2_lock.c
index fdca266..c86bcfe 100644
--- a/source3/smbd/smb2_lock.c
+++ b/source3/smbd/smb2_lock.c
@@ -335,7 +335,7 @@ static struct tevent_req *smbd_smb2_lock_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
- locks[i].smblctx = in_file_id_volatile;
+ locks[i].smblctx = fsp->fnum;
locks[i].offset = in_locks[i].offset;
locks[i].count = in_locks[i].length;
@@ -861,10 +861,8 @@ void cancel_pending_lock_requests_by_fid_smb2(files_struct *fsp,
struct smbd_smb2_lock_state *state = NULL;
files_struct *fsp_curr = NULL;
int i = smb2req->current_idx;
- uint64_t in_file_id_volatile;
struct blocking_lock_record *blr = NULL;
const uint8_t *inhdr;
- const uint8_t *inbody;
nextreq = smb2req->next;
@@ -883,9 +881,6 @@ void cancel_pending_lock_requests_by_fid_smb2(files_struct *fsp,
continue;
}
- inbody = (const uint8_t *)smb2req->in.vector[i+1].iov_base;
- in_file_id_volatile = BVAL(inbody, 0x10);
-
state = tevent_req_data(smb2req->subreq,
struct smbd_smb2_lock_state);
if (!state) {
@@ -893,7 +888,7 @@ void cancel_pending_lock_requests_by_fid_smb2(files_struct *fsp,
continue;
}
- fsp_curr = file_fsp(state->smb1req, (uint16_t)in_file_id_volatile);
+ fsp_curr = smb2req->compat_chain_fsp;
if (fsp_curr == NULL) {
/* Strange - is this even possible ? */
continue;
diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c
index d69ead9..abaf4c6 100644
--- a/source3/smbd/smb2_read.c
+++ b/source3/smbd/smb2_read.c
@@ -255,7 +255,7 @@ static int smb2_sendfile_send_data(struct smbd_smb2_read_state *state)
}
init_strict_lock_struct(fsp,
- state->in_file_id_volatile,
+ fsp->fnum,
in_offset,
in_length,
READ_LOCK,
@@ -497,7 +497,7 @@ static struct tevent_req *smbd_smb2_read_send(TALLOC_CTX *mem_ctx,
/* Fallback to synchronous. */
init_strict_lock_struct(fsp,
- in_file_id_volatile,
+ fsp->fnum,
in_offset,
in_length,
READ_LOCK,
diff --git a/source3/smbd/smb2_write.c b/source3/smbd/smb2_write.c
index 0b502a4..a149cb8 100644
--- a/source3/smbd/smb2_write.c
+++ b/source3/smbd/smb2_write.c
@@ -341,7 +341,7 @@ static struct tevent_req *smbd_smb2_write_send(TALLOC_CTX *mem_ctx,
/* Fallback to synchronous. */
init_strict_lock_struct(fsp,
- in_file_id_volatile,
+ fsp->fnum,
in_offset,
in_data.length,
WRITE_LOCK,
--
Samba Shared Repository
More information about the samba-cvs
mailing list