smbfs_vnops.c (140196) | smbfs_vnops.c (140223) |
---|---|
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_vnops.c 140196 2005-01-13 18:59:48Z phk $ | 32 * $FreeBSD: head/sys/fs/smbfs/smbfs_vnops.c 140223 2005-01-14 08:52:55Z phk $ |
33 */ 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/namei.h> 37#include <sys/kernel.h> 38#include <sys/proc.h> 39#include <sys/bio.h> 40#include <sys/buf.h> --- 127 unchanged lines hidden (view full) --- 168 SMBFSERR("open eacces vtype=%d\n", vp->v_type); 169 return EACCES; 170 } 171 if (vp->v_type == VDIR) { 172 np->n_flag |= NOPEN; 173 return 0; 174 } 175 if (np->n_flag & NMODIFIED) { | 33 */ 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/namei.h> 37#include <sys/kernel.h> 38#include <sys/proc.h> 39#include <sys/bio.h> 40#include <sys/buf.h> --- 127 unchanged lines hidden (view full) --- 168 SMBFSERR("open eacces vtype=%d\n", vp->v_type); 169 return EACCES; 170 } 171 if (vp->v_type == VDIR) { 172 np->n_flag |= NOPEN; 173 return 0; 174 } 175 if (np->n_flag & NMODIFIED) { |
176 if ((error = smbfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_td, 1)) == EINTR) | 176 if ((error = smbfs_vinvalbuf(vp, ap->a_td)) == EINTR) |
177 return error; 178 smbfs_attr_cacheremove(vp); 179 error = VOP_GETATTR(vp, &vattr, ap->a_cred, ap->a_td); 180 if (error) 181 return error; 182 np->n_mtime.tv_sec = vattr.va_mtime.tv_sec; 183 } else { 184 error = VOP_GETATTR(vp, &vattr, ap->a_cred, ap->a_td); 185 if (error) 186 return error; 187 if (np->n_mtime.tv_sec != vattr.va_mtime.tv_sec) { | 177 return error; 178 smbfs_attr_cacheremove(vp); 179 error = VOP_GETATTR(vp, &vattr, ap->a_cred, ap->a_td); 180 if (error) 181 return error; 182 np->n_mtime.tv_sec = vattr.va_mtime.tv_sec; 183 } else { 184 error = VOP_GETATTR(vp, &vattr, ap->a_cred, ap->a_td); 185 if (error) 186 return error; 187 if (np->n_mtime.tv_sec != vattr.va_mtime.tv_sec) { |
188 error = smbfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_td, 1); | 188 error = smbfs_vinvalbuf(vp, ap->a_td); |
189 if (error == EINTR) 190 return error; 191 np->n_mtime.tv_sec = vattr.va_mtime.tv_sec; 192 } 193 } 194 if ((np->n_flag & NOPEN) != 0) 195 return 0; 196 /* --- 1121 unchanged lines hidden --- | 189 if (error == EINTR) 190 return error; 191 np->n_mtime.tv_sec = vattr.va_mtime.tv_sec; 192 } 193 } 194 if ((np->n_flag & NOPEN) != 0) 195 return 0; 196 /* --- 1121 unchanged lines hidden --- |