diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-05-19 15:10:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:08:09 -0500 |
commit | 7f0e17e9030ad734977f66c2cc27faec501154a2 (patch) | |
tree | dc44952b04d4e61fb8fcff50b4a3cb720276b57d /source4/ntvfs/simple | |
parent | 472c0886254b82c2feffea734a80c4d29bd773b6 (diff) | |
download | samba-7f0e17e9030ad734977f66c2cc27faec501154a2.tar.gz samba-7f0e17e9030ad734977f66c2cc27faec501154a2.tar.xz samba-7f0e17e9030ad734977f66c2cc27faec501154a2.zip |
r15718: - split the SMBflush with the 0xFFFF wildcard fnum into a different level
metze
(This used to be commit 95bf41b4d4ec96349802955e364fe44ef85f9077)
Diffstat (limited to 'source4/ntvfs/simple')
-rw-r--r-- | source4/ntvfs/simple/vfs_simple.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c index 35c18e3f1c5..1698f57aeee 100644 --- a/source4/ntvfs/simple/vfs_simple.c +++ b/source4/ntvfs/simple/vfs_simple.c @@ -549,8 +549,22 @@ static NTSTATUS svfs_flush(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_flush *io) { - fsync(io->flush.in.file.fnum); - return NT_STATUS_OK; + struct svfs_private *private = ntvfs->private_data; + struct svfs_file *f; + + switch (io->generic.level) { + case RAW_FLUSH_FLUSH: + fsync(io->flush.in.file.fnum); + return NT_STATUS_OK; + + case RAW_FLUSH_ALL: + for (f=private->open_files;f;f=f->next) { + fsync(f->fd); + } + return NT_STATUS_OK; + } + + return NT_STATUS_INVALID_LEVEL; } /* |