summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-02-27 22:16:55 +0100
committerStefan Metzmacher <metze@samba.org>2008-02-28 08:11:04 +0100
commitbc1b595555bd667755291184aa380b011ed51795 (patch)
treec0532cfc70c810de0a9150daa7bd161fdebfe7fc /source4/cluster/ctdb
parent9028ecca22713d4069e6f610b546fd8d60756b81 (diff)
downloadsamba-bc1b595555bd667755291184aa380b011ed51795.tar.gz
samba-bc1b595555bd667755291184aa380b011ed51795.tar.bz2
samba-bc1b595555bd667755291184aa380b011ed51795.zip
opendb: only return delete_on_close on odb_get_delete_on_close()
metze (This used to be commit e699633db2d377a9077ff490208da277e250239b)
Diffstat (limited to 'source4/cluster/ctdb')
-rw-r--r--source4/cluster/ctdb/opendb_ctdb.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/source4/cluster/ctdb/opendb_ctdb.c b/source4/cluster/ctdb/opendb_ctdb.c
index 3f6c8a2343..3d67162d6d 100644
--- a/source4/cluster/ctdb/opendb_ctdb.c
+++ b/source4/cluster/ctdb/opendb_ctdb.c
@@ -563,20 +563,20 @@ static NTSTATUS odb_ctdb_set_delete_on_close(struct odb_lock *lck, bool del_on_c
people still have the file open
*/
static NTSTATUS odb_ctdb_get_delete_on_close(struct odb_context *odb,
- DATA_BLOB *key, bool *del_on_close,
- int *open_count, char **path)
+ DATA_BLOB *key, bool *del_on_close)
{
NTSTATUS status;
struct opendb_file file;
struct odb_lock *lck;
+ (*del_on_close) = false;
+
lck = odb_lock(odb, odb, key);
NT_STATUS_HAVE_NO_MEMORY(lck);
status = odb_pull_record(lck, &file);
if (NT_STATUS_EQUAL(NT_STATUS_OBJECT_NAME_NOT_FOUND, status)) {
talloc_free(lck);
- (*del_on_close) = false;
return NT_STATUS_OK;
}
if (!NT_STATUS_IS_OK(status)) {
@@ -585,16 +585,6 @@ static NTSTATUS odb_ctdb_get_delete_on_close(struct odb_context *odb,
}
(*del_on_close) = file.delete_on_close;
- if (open_count != NULL) {
- (*open_count) = file.num_entries;
- }
- if (path != NULL) {
- *path = talloc_strdup(odb, file.path);
- NT_STATUS_HAVE_NO_MEMORY(*path);
- if (file.num_entries == 1 && file.entries[0].delete_on_close) {
- (*del_on_close) = true;
- }
- }
talloc_free(lck);