Deleted Added
full compact
smbfs_io.c (111742) smbfs_io.c (111748)
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 111742 2003-03-02 15:56:49Z des $
32 * $FreeBSD: head/sys/fs/smbfs/smbfs_io.c 111748 2003-03-02 16:54:40Z des $
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>

--- 641 unchanged lines hidden (view full) ---

682 slpflag = PCATCH;
683 slptimeo = 2 * hz;
684 } else {
685 slpflag = 0;
686 slptimeo = 0;
687 }
688 while (np->n_flag & NFLUSHINPROG) {
689 np->n_flag |= NFLUSHWANT;
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>

--- 641 unchanged lines hidden (view full) ---

682 slpflag = PCATCH;
683 slptimeo = 2 * hz;
684 } else {
685 slpflag = 0;
686 slptimeo = 0;
687 }
688 while (np->n_flag & NFLUSHINPROG) {
689 np->n_flag |= NFLUSHWANT;
690 error = tsleep((caddr_t)&np->n_flag, PRIBIO + 2, "smfsvinv", slptimeo);
690 error = tsleep(&np->n_flag, PRIBIO + 2, "smfsvinv", slptimeo);
691 error = smb_proc_intr(td->td_proc);
692 if (error == EINTR && intrflg)
693 return EINTR;
694 }
695 np->n_flag |= NFLUSHINPROG;
696 error = vinvalbuf(vp, flags, cred, td, slpflag, 0);
697 while (error) {
698 if (intrflg && (error == ERESTART || error == EINTR)) {
699 np->n_flag &= ~NFLUSHINPROG;
700 if (np->n_flag & NFLUSHWANT) {
701 np->n_flag &= ~NFLUSHWANT;
691 error = smb_proc_intr(td->td_proc);
692 if (error == EINTR && intrflg)
693 return EINTR;
694 }
695 np->n_flag |= NFLUSHINPROG;
696 error = vinvalbuf(vp, flags, cred, td, slpflag, 0);
697 while (error) {
698 if (intrflg && (error == ERESTART || error == EINTR)) {
699 np->n_flag &= ~NFLUSHINPROG;
700 if (np->n_flag & NFLUSHWANT) {
701 np->n_flag &= ~NFLUSHWANT;
702 wakeup((caddr_t)&np->n_flag);
702 wakeup(&np->n_flag);
703 }
704 return EINTR;
705 }
706 error = vinvalbuf(vp, flags, cred, td, slpflag, 0);
707 }
708 np->n_flag &= ~(NMODIFIED | NFLUSHINPROG);
709 if (np->n_flag & NFLUSHWANT) {
710 np->n_flag &= ~NFLUSHWANT;
703 }
704 return EINTR;
705 }
706 error = vinvalbuf(vp, flags, cred, td, slpflag, 0);
707 }
708 np->n_flag &= ~(NMODIFIED | NFLUSHINPROG);
709 if (np->n_flag & NFLUSHWANT) {
710 np->n_flag &= ~NFLUSHWANT;
711 wakeup((caddr_t)&np->n_flag);
711 wakeup(&np->n_flag);
712 }
713 return (error);
714}
712 }
713 return (error);
714}