smbfs_io.c (87194) | smbfs_io.c (91406) |
---|---|
1/* 2 * Copyright (c) 2000-2001, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 2000-2001, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/fs/smbfs/smbfs_io.c 87194 2001-12-02 08:56:58Z bp $ | 32 * $FreeBSD: head/sys/fs/smbfs/smbfs_io.c 91406 2002-02-27 18:32:23Z jhb $ |
33 * 34 */ 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/resourcevar.h> /* defines plimit structure in proc struct */ 38#include <sys/kernel.h> 39#include <sys/proc.h> 40#include <sys/fcntl.h> --- 383 unchanged lines hidden (view full) --- 424 struct ucred *cred; 425 struct smbmount *smp; 426 struct smbnode *np; 427 struct smb_cred scred; 428 vm_page_t *pages; 429 430 vp = ap->a_vp; 431 td = curthread; /* XXX */ | 33 * 34 */ 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/resourcevar.h> /* defines plimit structure in proc struct */ 38#include <sys/kernel.h> 39#include <sys/proc.h> 40#include <sys/fcntl.h> --- 383 unchanged lines hidden (view full) --- 424 struct ucred *cred; 425 struct smbmount *smp; 426 struct smbnode *np; 427 struct smb_cred scred; 428 vm_page_t *pages; 429 430 vp = ap->a_vp; 431 td = curthread; /* XXX */ |
432 cred = td->td_proc->p_ucred; /* XXX */ | 432 cred = td->td_ucred; /* XXX */ |
433 np = VTOSMB(vp); 434 smp = VFSTOSMBFS(vp->v_mount); 435 pages = ap->a_m; 436 count = ap->a_count; 437 438 if (vp->v_object == NULL) { 439 printf("smbfs_getpages: called with non-merged cache vnode??\n"); 440 return VM_PAGER_ERROR; --- 103 unchanged lines hidden (view full) --- 544{ 545 int error; 546 struct vnode *vp = ap->a_vp; 547 struct thread *td; 548 struct ucred *cred; 549 550#ifdef SMBFS_RWGENERIC 551 td = curthread; /* XXX */ | 433 np = VTOSMB(vp); 434 smp = VFSTOSMBFS(vp->v_mount); 435 pages = ap->a_m; 436 count = ap->a_count; 437 438 if (vp->v_object == NULL) { 439 printf("smbfs_getpages: called with non-merged cache vnode??\n"); 440 return VM_PAGER_ERROR; --- 103 unchanged lines hidden (view full) --- 544{ 545 int error; 546 struct vnode *vp = ap->a_vp; 547 struct thread *td; 548 struct ucred *cred; 549 550#ifdef SMBFS_RWGENERIC 551 td = curthread; /* XXX */ |
552 cred = td->td_proc->p_ucred; /* XXX */ | 552 cred = td->td_ucred; /* XXX */ |
553 VOP_OPEN(vp, FWRITE, cred, td); 554 error = vop_stdputpages(ap); 555 VOP_CLOSE(vp, FWRITE, cred, td); 556 return error; 557#else 558 struct uio uio; 559 struct iovec iov; 560 vm_offset_t kva; 561 struct buf *bp; 562 int i, npages, count; 563 int *rtvals; 564 struct smbmount *smp; 565 struct smbnode *np; 566 struct smb_cred scred; 567 vm_page_t *pages; 568 569 td = curthread; /* XXX */ | 553 VOP_OPEN(vp, FWRITE, cred, td); 554 error = vop_stdputpages(ap); 555 VOP_CLOSE(vp, FWRITE, cred, td); 556 return error; 557#else 558 struct uio uio; 559 struct iovec iov; 560 vm_offset_t kva; 561 struct buf *bp; 562 int i, npages, count; 563 int *rtvals; 564 struct smbmount *smp; 565 struct smbnode *np; 566 struct smb_cred scred; 567 vm_page_t *pages; 568 569 td = curthread; /* XXX */ |
570 cred = td->td_proc->p_ucred; /* XXX */ | 570 cred = td->td_ucred; /* XXX */ |
571/* VOP_OPEN(vp, FWRITE, cred, td);*/ 572 np = VTOSMB(vp); 573 smp = VFSTOSMBFS(vp->v_mount); 574 pages = ap->a_m; 575 count = ap->a_count; 576 rtvals = ap->a_rtvals; 577 npages = btoc(count); 578 --- 99 unchanged lines hidden --- | 571/* VOP_OPEN(vp, FWRITE, cred, td);*/ 572 np = VTOSMB(vp); 573 smp = VFSTOSMBFS(vp->v_mount); 574 pages = ap->a_m; 575 count = ap->a_count; 576 rtvals = ap->a_rtvals; 577 npages = btoc(count); 578 --- 99 unchanged lines hidden --- |