From 7f0e17e9030ad734977f66c2cc27faec501154a2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 19 May 2006 15:10:39 +0000 Subject: r15718: - split the SMBflush with the 0xFFFF wildcard fnum into a different level metze (This used to be commit 95bf41b4d4ec96349802955e364fe44ef85f9077) --- source4/ntvfs/posix/pvfs_flush.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'source4/ntvfs/posix') diff --git a/source4/ntvfs/posix/pvfs_flush.c b/source4/ntvfs/posix/pvfs_flush.c index d21f257201..c1d8820c43 100644 --- a/source4/ntvfs/posix/pvfs_flush.c +++ b/source4/ntvfs/posix/pvfs_flush.c @@ -46,23 +46,27 @@ NTSTATUS pvfs_flush(struct ntvfs_module_context *ntvfs, struct pvfs_state *pvfs = ntvfs->private_data; struct pvfs_file *f; - if (io->flush.in.file.fnum != 0xFFFF) { + switch (io->generic.level) { + case RAW_FLUSH_FLUSH: f = pvfs_find_fd(pvfs, req, io->flush.in.file.fnum); if (!f) { return NT_STATUS_INVALID_HANDLE; } pvfs_flush_file(pvfs, f); return NT_STATUS_OK; - } - if (!(pvfs->flags & PVFS_FLAG_STRICT_SYNC)) { - return NT_STATUS_OK; - } + case RAW_FLUSH_ALL: + if (!(pvfs->flags & PVFS_FLAG_STRICT_SYNC)) { + return NT_STATUS_OK; + } - /* they are asking to flush all open files */ - for (f=pvfs->files.list;f;f=f->next) { - pvfs_flush_file(pvfs, f); + /* they are asking to flush all open files */ + for (f=pvfs->files.list;f;f=f->next) { + pvfs_flush_file(pvfs, f); + } + + return NT_STATUS_OK; } - return NT_STATUS_OK; + return NT_STATUS_INVALID_LEVEL; } -- cgit