summaryrefslogtreecommitdiff
path: root/source3/locking/proto.h
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-01-09 14:30:53 +0100
committerJeremy Allison <jra@samba.org>2012-01-12 23:59:22 +0100
commit9cf6d735d43f6f905b19f52d38c93aa30092333d (patch)
treefd75eba7dc698d61b3f8d5ef240c31fef068f28a /source3/locking/proto.h
parent540e51f77e07cc65b6b097f8ff01cd10f04644d0 (diff)
downloadsamba-9cf6d735d43f6f905b19f52d38c93aa30092333d.tar.gz
samba-9cf6d735d43f6f905b19f52d38c93aa30092333d.tar.bz2
samba-9cf6d735d43f6f905b19f52d38c93aa30092333d.zip
s3: Introduce get_share_mode_lock_fresh()
This slightly simplifies the code path for all callers which assume that a share mode exists already. Only the callers in open_file_ntcreate and open_directory will ever create new share modes. Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/locking/proto.h')
-rw-r--r--source3/locking/proto.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/locking/proto.h b/source3/locking/proto.h
index d6f1c1bf4a..25f3d196b8 100644
--- a/source3/locking/proto.h
+++ b/source3/locking/proto.h
@@ -147,10 +147,13 @@ bool locking_init_readonly(void);
bool locking_end(void);
char *share_mode_str(TALLOC_CTX *ctx, int num, const struct share_mode_entry *e);
struct share_mode_lock *get_share_mode_lock(TALLOC_CTX *mem_ctx,
- const struct file_id id,
- const char *servicepath,
- const struct smb_filename *smb_fname,
- const struct timespec *old_write_time);
+ const struct file_id id);
+struct share_mode_lock *get_share_mode_lock_fresh(
+ TALLOC_CTX *mem_ctx,
+ const struct file_id id,
+ const char *servicepath,
+ const struct smb_filename *smb_fname,
+ const struct timespec *old_write_time);
struct share_mode_lock *fetch_share_mode_unlocked(TALLOC_CTX *mem_ctx,
const struct file_id id);
bool rename_share_filename(struct messaging_context *msg_ctx,