From fd9a6d5e4679ba4d1480dcbff23fb49504573715 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 22 Feb 2006 11:11:16 +0000 Subject: r13623: - make sure ntvfs_map_qfileinfo isn't used for async replies - add some comments metze (This used to be commit e1611b622184b48d2cef1eff2646a09f9e691f9b) --- source4/ntvfs/ntvfs_generic.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c index b30508b1d7..e5224aafcd 100644 --- a/source4/ntvfs/ntvfs_generic.c +++ b/source4/ntvfs/ntvfs_generic.c @@ -495,8 +495,7 @@ _PUBLIC_ NTSTATUS ntvfs_map_fsinfo(struct smbsrv_request *req, union smb_fsinfo return NT_STATUS_INVALID_LEVEL; } - /* this map function is only used by the simple backend, which - doesn't do async */ + /* only used by the simple backend, which doesn't do async */ req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC; /* ask the backend for the generic info */ @@ -854,6 +853,9 @@ _PUBLIC_ NTSTATUS ntvfs_map_qfileinfo(struct smbsrv_request *req, union smb_file info2->generic.level = RAW_FILEINFO_GENERIC; info2->generic.in.fnum = info->generic.in.fnum; + /* only used by the simple backend, which doesn't do async */ + req->async_states->state &= ~NTVFS_ASYNC_STATE_MAY_ASYNC; + status = ntvfs->ops->qfileinfo(ntvfs, req, info2); if (!NT_STATUS_IS_OK(status)) { return status; @@ -937,6 +939,11 @@ _PUBLIC_ NTSTATUS ntvfs_map_lock(struct smbsrv_request *req, union smb_lock *lck locks->offset = lck->lock.in.offset; locks->count = lck->lock.in.count; + /* + * we don't need to call ntvfs_map_async_setup() here, + * as lock() doesn't have any output fields + */ + return ntvfs->ops->lock(ntvfs, req, lck2); } @@ -1222,5 +1229,10 @@ _PUBLIC_ NTSTATUS ntvfs_map_close(struct smbsrv_request *req, union smb_close *c break; } + /* + * we don't need to call ntvfs_map_async_setup() here, + * as close() doesn't have any output fields + */ + return ntvfs->ops->close(ntvfs, req, cl2); } -- cgit