volume: use actual fh instead of rootfh for volume queries

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2011-02-24 17:39:42 -08:00 committed by unknown
parent db5983734d
commit e3c67c0bfa
3 changed files with 16 additions and 5 deletions

View file

@ -210,6 +210,7 @@ typedef struct _updowncall_entry {
BOOLEAN set;
} Symlink;
struct {
HANDLE open_state;
HANDLE session;
FS_INFORMATION_CLASS query;
PVOID buf;
@ -1068,7 +1069,7 @@ NTSTATUS marshal_nfs41_volume(nfs41_updowncall_entry *entry,
goto out;
else
tmp += *len;
header_len = *len + sizeof(HANDLE) + sizeof(FS_INFORMATION_CLASS);
header_len = *len + 2 * sizeof(HANDLE) + sizeof(FS_INFORMATION_CLASS);
if (header_len > buf_len) {
status = STATUS_INSUFFICIENT_RESOURCES;
goto out;
@ -1076,6 +1077,8 @@ NTSTATUS marshal_nfs41_volume(nfs41_updowncall_entry *entry,
RtlCopyMemory(tmp, &entry->u.Volume.session, sizeof(HANDLE));
tmp += sizeof(HANDLE);
RtlCopyMemory(tmp, &entry->u.Volume.open_state, sizeof(HANDLE));
tmp += sizeof(HANDLE);
RtlCopyMemory(tmp, &entry->u.Volume.query, sizeof(FS_INFORMATION_CLASS));
*len = header_len;
@ -3381,6 +3384,7 @@ NTSTATUS nfs41_QueryVolumeInformation (
status = nfs41_UpcallCreate(NFS41_VOLUME_QUERY, &nfs41_fobx->sec_ctx, &entry);
if (status)
goto out;
entry->u.Volume.open_state = nfs41_fobx->nfs41_open_state;
entry->u.Volume.session = pVNetRootContext->session;
entry->u.Volume.query = InfoClass;
entry->u.Volume.buf = RxContext->Info.Buffer;