s3: get_share_mode_lock_fresh->get_share_mode_lock
authorVolker Lendecke <vl@samba.org>
Sun, 19 Feb 2012 13:27:49 +0000 (14:27 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 19 Feb 2012 18:16:41 +0000 (19:16 +0100)
get_share_mode_lock_fresh is just a confusing name

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Sun Feb 19 19:16:41 CET 2012 on sn-devel-104

source3/locking/locking.c
source3/locking/proto.h
source3/locking/share_mode_lock.c
source3/smbd/open.c

index 385db18b956f99f4b5f00ffe3af0e7190c72429e..149a79d27a440f542e6c7c81485c6f3024266a15 100644 (file)
@@ -456,7 +456,7 @@ char *share_mode_str(TALLOC_CTX *ctx, int num, const struct share_mode_entry *e)
 struct share_mode_lock *get_existing_share_mode_lock(TALLOC_CTX *mem_ctx,
                                                     const struct file_id id)
 {
-       return get_share_mode_lock_fresh(mem_ctx, id, NULL, NULL, NULL);
+       return get_share_mode_lock(mem_ctx, id, NULL, NULL, NULL);
 }
 
 /*******************************************************************
index 1aa1d5035afb9b6eb7253d7d6bd84f6352aea9e8..3a6df37e93c4fe0594ac41d781d3c63f59cc1791 100644 (file)
@@ -148,7 +148,7 @@ bool locking_end(void);
 char *share_mode_str(TALLOC_CTX *ctx, int num, const struct share_mode_entry *e);
 struct share_mode_lock *get_existing_share_mode_lock(TALLOC_CTX *mem_ctx,
                                                     const struct file_id id);
-struct share_mode_lock *get_share_mode_lock_fresh(
+struct share_mode_lock *get_share_mode_lock(
        TALLOC_CTX *mem_ctx,
        const struct file_id id,
        const char *servicepath,
index 6bc055f70fea626a4d1d2d776eab24c368327a7e..2152591ed27bf7c5b29bd7745bb15772781bb418 100644 (file)
@@ -388,7 +388,7 @@ static int the_lock_destructor(struct share_mode_lock *l)
  Get a share_mode_lock, Reference counted to allow nexted calls.
 ********************************************************************/
 
-struct share_mode_lock *get_share_mode_lock_fresh(
+struct share_mode_lock *get_share_mode_lock(
        TALLOC_CTX *mem_ctx,
        const struct file_id id,
        const char *servicepath,
index ed3ef90f1691d92884d17c23fac39b37e214c627..e9637c8ce9cc143f563f8cf6331758e95c3d7a53 100644 (file)
@@ -1949,9 +1949,9 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
                struct timespec old_write_time = smb_fname->st.st_ex_mtime;
                id = vfs_file_id_from_sbuf(conn, &smb_fname->st);
 
-               lck = get_share_mode_lock_fresh(talloc_tos(), id,
-                                               conn->connectpath,
-                                               smb_fname, &old_write_time);
+               lck = get_share_mode_lock(talloc_tos(), id,
+                                         conn->connectpath,
+                                         smb_fname, &old_write_time);
                if (lck == NULL) {
                        DEBUG(0, ("Could not get share mode lock\n"));
                        return NT_STATUS_SHARING_VIOLATION;
@@ -2191,9 +2191,9 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
 
                id = fsp->file_id;
 
-               lck = get_share_mode_lock_fresh(talloc_tos(), id,
-                                               conn->connectpath,
-                                               smb_fname, &old_write_time);
+               lck = get_share_mode_lock(talloc_tos(), id,
+                                         conn->connectpath,
+                                         smb_fname, &old_write_time);
 
                if (lck == NULL) {
                        DEBUG(0, ("open_file_ntcreate: Could not get share "
@@ -2878,9 +2878,9 @@ static NTSTATUS open_directory(connection_struct *conn,
                return NT_STATUS_ACCESS_DENIED;
        }
 
-       lck = get_share_mode_lock_fresh(talloc_tos(), fsp->file_id,
-                                       conn->connectpath, smb_dname,
-                                       &mtimespec);
+       lck = get_share_mode_lock(talloc_tos(), fsp->file_id,
+                                 conn->connectpath, smb_dname,
+                                 &mtimespec);
 
        if (lck == NULL) {
                DEBUG(0, ("open_directory: Could not get share mode lock for "