[cosmetic] formatting changes to open.c
This commit is contained in:
parent
74147edb93
commit
328b175cae
1 changed files with 20 additions and 22 deletions
|
|
@ -58,13 +58,11 @@ static int create_open_state(
|
|||
state->path.len = (unsigned short)strlen(state->path.path);
|
||||
path_fh_init(&state->file, &state->path);
|
||||
path_fh_init(&state->parent, &state->path);
|
||||
last_component(state->path.path, state->file.name.name,
|
||||
&state->parent.name);
|
||||
last_component(state->path.path, state->file.name.name, &state->parent.name);
|
||||
|
||||
StringCchPrintfA((LPSTR)state->owner.owner, NFS4_OPAQUE_LIMIT,
|
||||
"%u", open_owner_id);
|
||||
state->owner.owner_len = (uint32_t)strlen(
|
||||
(const char*)state->owner.owner);
|
||||
StringCchPrintfA((LPSTR)state->owner.owner, NFS4_OPAQUE_LIMIT, "%u",
|
||||
open_owner_id);
|
||||
state->owner.owner_len = (uint32_t)strlen((const char*)state->owner.owner);
|
||||
state->ref_count = 1;
|
||||
list_init(&state->locks.list);
|
||||
list_init(&state->client_entry);
|
||||
|
|
@ -99,8 +97,7 @@ void nfs41_open_state_ref(
|
|||
{
|
||||
const LONG count = InterlockedIncrement(&state->ref_count);
|
||||
|
||||
dprintf(2, "nfs41_open_state_ref(%s) count %d\n",
|
||||
state->path.path, count);
|
||||
dprintf(2, "nfs41_open_state_ref(%s) count %d\n", state->path.path, count);
|
||||
}
|
||||
|
||||
void nfs41_open_state_deref(
|
||||
|
|
@ -108,8 +105,7 @@ void nfs41_open_state_deref(
|
|||
{
|
||||
const LONG count = InterlockedDecrement(&state->ref_count);
|
||||
|
||||
dprintf(2, "nfs41_open_state_deref(%s) count %d\n",
|
||||
state->path.path, count);
|
||||
dprintf(2, "nfs41_open_state_deref(%s) count %d\n", state->path.path, count);
|
||||
if (count == 0)
|
||||
open_state_free(state);
|
||||
}
|
||||
|
|
@ -286,7 +282,8 @@ out:
|
|||
return status;
|
||||
}
|
||||
|
||||
static BOOLEAN open_for_attributes(uint32_t type, ULONG access_mask, ULONG disposition)
|
||||
static BOOLEAN open_for_attributes(uint32_t type, ULONG access_mask,
|
||||
ULONG disposition)
|
||||
{
|
||||
if (type == NF4DIR) {
|
||||
if (disposition == FILE_OPEN || disposition == FILE_OVERWRITE) {
|
||||
|
|
@ -554,7 +551,8 @@ static int handle_open(nfs41_upcall *upcall)
|
|||
state->file.fh.superblock = state->parent.fh.superblock;
|
||||
|
||||
status = NO_ERROR;
|
||||
} else if (open_for_attributes(state->type, args->access_mask, args->disposition)) {
|
||||
} else if (open_for_attributes(state->type, args->access_mask,
|
||||
args->disposition)) {
|
||||
if (status) {
|
||||
dprintf(1, "nfs41_lookup failed with %d\n", status);
|
||||
goto out_free_state;
|
||||
|
|
@ -582,13 +580,13 @@ static int handle_open(nfs41_upcall *upcall)
|
|||
}
|
||||
|
||||
if (create == OPEN4_CREATE && (args->create_opts & FILE_DIRECTORY_FILE)) {
|
||||
status = nfs41_create(state->session, NF4DIR, args->mode,
|
||||
NULL, &state->parent, &state->file);
|
||||
status = nfs41_create(state->session, NF4DIR, args->mode, NULL,
|
||||
&state->parent, &state->file);
|
||||
args->std_info.Directory = 1;
|
||||
args->created = status == NFS4_OK ? TRUE : FALSE;
|
||||
} else {
|
||||
status = open_or_delegate(state, create,
|
||||
createhowmode, args->mode, TRUE, &info);
|
||||
status = open_or_delegate(state, create, createhowmode, args->mode,
|
||||
TRUE, &info);
|
||||
if (status == NFS4_OK) {
|
||||
nfs_to_basic_info(&info, &args->basic_info);
|
||||
nfs_to_standard_info(&info, &args->std_info);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue