From 78b85c96c946069cd16ad7399b0dd8cfb7e2590b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 29 Oct 2004 04:43:28 +0000 Subject: r3351: handle far more operations on open directory handles. pvfs was failing with a wxp client because of qfileinfo operations on directories failing with NT_STATUS_INVALID_HANDLE after the fstat() failed (as pvfs sets f->fd to -1 for directories) (This used to be commit 1993128cb1dbf49db6e3e0387996ecf2a14b8d76) --- source4/ntvfs/posix/pvfs_flush.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/ntvfs/posix/pvfs_flush.c') diff --git a/source4/ntvfs/posix/pvfs_flush.c b/source4/ntvfs/posix/pvfs_flush.c index 49eaa74cfb..43893af80d 100644 --- a/source4/ntvfs/posix/pvfs_flush.c +++ b/source4/ntvfs/posix/pvfs_flush.c @@ -28,6 +28,9 @@ */ static void pvfs_flush_file(struct pvfs_state *pvfs, struct pvfs_file *f) { + if (f->name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) { + return; + } if (pvfs->flags & PVFS_FLAG_STRICT_SYNC) { fsync(f->fd); } -- cgit