not allowing unmount if there are opened files
even though we might have the same server mounted under 2 drive letters, make it so that you can't umount if any files are opened in that netroot. not checking for that allows us to umount the driver while it is still in use. then there is no way to "unmount" from nfsd's perspective and it'll have that session and connection going forever. passing "false" to RxFinalizeConnection makes it so that when files are opened it won't allow the unmount, but when the files are closed, it will successfully unmount but RDBSS never call FinalizeNetRoot() function and thus we never really unmount. i noticed that FinalizeVNetRoot() is never called. Returns from FinalizeNetRoot() are ignored so we can't fail there if we have opened files.
This commit is contained in:
parent
853dcc385e
commit
89cd10a1f9
1 changed files with 6 additions and 0 deletions
|
|
@ -1874,6 +1874,12 @@ NTSTATUS nfs41_DevFcbXXXControlFile(
|
||||||
status = nfs41_CreateConnection(RxContext, &RxContext->PostRequest);
|
status = nfs41_CreateConnection(RxContext, &RxContext->PostRequest);
|
||||||
break;
|
break;
|
||||||
case IOCTL_NFS41_DELCONN:
|
case IOCTL_NFS41_DELCONN:
|
||||||
|
if (RxContext->RxDeviceObject->NumberOfActiveFcbs > 0) {
|
||||||
|
DbgP("device has open handles %d\n",
|
||||||
|
RxContext->RxDeviceObject->NumberOfActiveFcbs);
|
||||||
|
status = STATUS_REDIRECTOR_HAS_OPEN_HANDLES;
|
||||||
|
break;
|
||||||
|
}
|
||||||
status = nfs41_DeleteConnection(RxContext, &RxContext->PostRequest);
|
status = nfs41_DeleteConnection(RxContext, &RxContext->PostRequest);
|
||||||
break;
|
break;
|
||||||
case IOCTL_NFS41_GETSTATE:
|
case IOCTL_NFS41_GETSTATE:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue