From 19fc6e8f511f028aa40122cc7e40c83908d07ebe Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 8 Nov 2004 03:54:12 +0000 Subject: r3615: split out struct pvfs_file_handle from struct pvfs_file. This is in preparation for adding code to pass the BASE-DENY1 and BASE-DENYDOS tests, which require a shared filesystem handle for some specific combinations of two DENY_DOS opens on the same connection. (This used to be commit 6e4fdf01d19051e3923d7703dbf990fc1722b09a) --- source4/ntvfs/posix/pvfs_seek.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'source4/ntvfs/posix/pvfs_seek.c') diff --git a/source4/ntvfs/posix/pvfs_seek.c b/source4/ntvfs/posix/pvfs_seek.c index c90db952fc..c4dd30bd85 100644 --- a/source4/ntvfs/posix/pvfs_seek.c +++ b/source4/ntvfs/posix/pvfs_seek.c @@ -31,31 +31,33 @@ NTSTATUS pvfs_seek(struct ntvfs_module_context *ntvfs, { struct pvfs_state *pvfs = ntvfs->private_data; struct pvfs_file *f; + struct pvfs_file_handle *h; NTSTATUS status; f = pvfs_find_fd(pvfs, req, io->in.fnum); if (!f) { return NT_STATUS_INVALID_HANDLE; } + h = f->handle; status = NT_STATUS_OK; switch (io->in.mode) { case SEEK_MODE_START: - f->seek_offset = io->in.offset; + h->seek_offset = io->in.offset; break; case SEEK_MODE_CURRENT: - f->seek_offset += io->in.offset; + h->seek_offset += io->in.offset; break; case SEEK_MODE_END: - status = pvfs_resolve_name_fd(pvfs, f->fd, f->name); - f->seek_offset = f->name->st.st_size + io->in.offset; + status = pvfs_resolve_name_fd(pvfs, h->fd, h->name); + h->seek_offset = h->name->st.st_size + io->in.offset; break; } - io->out.offset = f->seek_offset; + io->out.offset = h->seek_offset; return status; } -- cgit