ea: defer storing mode until SetEaInfo succeeds

on SetEaInfo for NfsV3Attributes, wait to set nfs41_fcb.mode until the upcall returns successfully

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2012-04-09 11:43:19 -04:00 committed by unknown
parent 92d3500bd2
commit 7bd70cf488

View file

@ -4471,7 +4471,7 @@ NTSTATUS nfs41_SetEaInformation(
print_nfs3_attrs(attrs); print_nfs3_attrs(attrs);
DbgP("old mode is %o new mode is %o\n", nfs41_fcb->mode, attrs->mode); DbgP("old mode is %o new mode is %o\n", nfs41_fcb->mode, attrs->mode);
#endif #endif
entry->u.SetEa.mode = nfs41_fcb->mode = attrs->mode; entry->u.SetEa.mode = attrs->mode;
} else { } else {
entry->u.SetEa.mode = 0; entry->u.SetEa.mode = 0;
status = IoCheckEaBufferValidity(eainfo, buflen, &error_offset); status = IoCheckEaBufferValidity(eainfo, buflen, &error_offset);
@ -4499,6 +4499,7 @@ NTSTATUS nfs41_SetEaInformation(
(FILE_READ_DATA | FILE_WRITE_DATA | FILE_APPEND_DATA))) (FILE_READ_DATA | FILE_WRITE_DATA | FILE_APPEND_DATA)))
nfs41_update_fcb_list(RxContext->pFcb, entry->u.SetEa.ChangeTime); nfs41_update_fcb_list(RxContext->pFcb, entry->u.SetEa.ChangeTime);
nfs41_fcb->changeattr = entry->u.SetEa.ChangeTime; nfs41_fcb->changeattr = entry->u.SetEa.ChangeTime;
nfs41_fcb->mode = entry->u.SetEa.mode;
} }
RxFreePool(entry); RxFreePool(entry);
out: out: