diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c index 392247b..2ec6c12 100644 --- a/sys/nfs41_driver.c +++ b/sys/nfs41_driver.c @@ -365,7 +365,6 @@ typedef struct _NFS41_NETROOT_EXTENSION { BOOLEAN mounts_init; FAST_MUTEX mountLock; nfs41_mount_list mounts; - FILE_FS_ATTRIBUTE_INFORMATION FsAttrs; } NFS41_NETROOT_EXTENSION, *PNFS41_NETROOT_EXTENSION; #define NFS41GetNetRootExtension(pNetRoot) \ (((pNetRoot) == NULL) ? NULL : \ @@ -3063,8 +3062,6 @@ NTSTATUS nfs41_CreateVNetRoot( goto out_free; } pVNetRootContext->timeout = Config->timeout; - RtlCopyMemory(&pNetRootContext->FsAttrs, &pVNetRootContext->FsAttrs, - sizeof(pVNetRootContext->FsAttrs)); if (!found_existing_mount) { /* create a new mount entry and add it to the list */ @@ -3106,8 +3103,6 @@ NTSTATUS nfs41_CreateVNetRoot( case RPCSEC_AUTHGSS_KRB5P: existing_mount->gssp_session = pVNetRootContext->session; break; } - RtlCopyMemory(&pVNetRootContext->FsAttrs, &pNetRootContext->FsAttrs, - sizeof(pVNetRootContext->FsAttrs)); } pNetRootContext->nfs41d_version = nfs41d_version; #ifdef DEBUG_MOUNT @@ -3349,9 +3344,9 @@ BOOLEAN isOpen2Create( BOOLEAN isFilenameTooLong( PUNICODE_STRING name, - PNFS41_NETROOT_EXTENSION pNetRootContext) + PNFS41_V_NET_ROOT_EXTENSION pVNetRootContext) { - PFILE_FS_ATTRIBUTE_INFORMATION attrs = &pNetRootContext->FsAttrs; + PFILE_FS_ATTRIBUTE_INFORMATION attrs = &pVNetRootContext->FsAttrs; LONG len = attrs->MaximumComponentNameLength, count = 1, i; PWCH p = name->Buffer; for (i = 0; i < name->Length / 2; i++) { @@ -3547,7 +3542,7 @@ NTSTATUS check_nfs41_create_args( goto out; } } - if (isFilenameTooLong(SrvOpen->pAlreadyPrefixedName, pNetRootContext)) { + if (isFilenameTooLong(SrvOpen->pAlreadyPrefixedName, pVNetRootContext)) { status = STATUS_OBJECT_NAME_INVALID; goto out; } @@ -4365,8 +4360,7 @@ NTSTATUS nfs41_QueryVolumeInformation( /* on attribute queries for the root directory, * use cached volume attributes from mount */ - if (is_root_directory(RxContext) || - pNetRootContext->FsAttrs.MaximumComponentNameLength != 0) { + if (is_root_directory(RxContext)) { PFILE_FS_ATTRIBUTE_INFORMATION attrs = (PFILE_FS_ATTRIBUTE_INFORMATION)RxContext->Info.Buffer; DECLARE_CONST_UNICODE_STRING(FsName, FS_NAME); @@ -5314,8 +5308,6 @@ NTSTATUS check_nfs41_setattr_args( FILE_INFORMATION_CLASS InfoClass = RxContext->Info.FileInformationClass; __notnull PNFS41_V_NET_ROOT_EXTENSION pVNetRootContext = NFS41GetVNetRootExtension(RxContext->pRelevantSrvOpen->pVNetRoot); - __notnull PNFS41_NETROOT_EXTENSION pNetRootContext = - NFS41GetNetRootExtension(RxContext->pRelevantSrvOpen->pVNetRoot->pNetRoot); if (pVNetRootContext->read_only) { print_error("check_nfs41_setattr_args: Read-only mount\n"); @@ -5348,7 +5340,7 @@ NTSTATUS check_nfs41_setattr_args( #ifdef DEBUG_FILE_SET DbgP("Attempting to rename to '%wZ'\n", &dst); #endif - if (isFilenameTooLong(&dst, pNetRootContext)) { + if (isFilenameTooLong(&dst, pVNetRootContext)) { status = STATUS_OBJECT_NAME_INVALID; goto out; } @@ -5367,7 +5359,7 @@ NTSTATUS check_nfs41_setattr_args( #ifdef DEBUG_FILE_SET DbgP("Attempting to add link as '%wZ'\n", &dst); #endif - if (isFilenameTooLong(&dst, pNetRootContext)) { + if (isFilenameTooLong(&dst, pVNetRootContext)) { status = STATUS_OBJECT_NAME_INVALID; goto out; }