Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/smbfs/smbfs_io.c
Show First 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | if (vp->v_type == VDIR) { | ||||
if (lks == LK_SHARED) | if (lks == LK_SHARED) | ||||
vn_lock(vp, LK_DOWNGRADE | LK_RETRY); | vn_lock(vp, LK_DOWNGRADE | LK_RETRY); | ||||
return error; | return error; | ||||
} | } | ||||
/* biosize = SSTOCN(smp->sm_share)->sc_txmax;*/ | /* biosize = SSTOCN(smp->sm_share)->sc_txmax;*/ | ||||
if (np->n_flag & NMODIFIED) { | if (np->n_flag & NMODIFIED) { | ||||
smbfs_attr_cacheremove(vp); | smbfs_attr_cacheremove(vp); | ||||
error = VOP_GETATTR(vp, &vattr, cred); | error = VOP_GETATTR(vp, 0, &vattr, cred); | ||||
if (error) | if (error) | ||||
return error; | return error; | ||||
np->n_mtime.tv_sec = vattr.va_mtime.tv_sec; | np->n_mtime.tv_sec = vattr.va_mtime.tv_sec; | ||||
} else { | } else { | ||||
error = VOP_GETATTR(vp, &vattr, cred); | error = VOP_GETATTR(vp, 0, &vattr, cred); | ||||
if (error) | if (error) | ||||
return error; | return error; | ||||
if (np->n_mtime.tv_sec != vattr.va_mtime.tv_sec) { | if (np->n_mtime.tv_sec != vattr.va_mtime.tv_sec) { | ||||
error = smbfs_vinvalbuf(vp, td); | error = smbfs_vinvalbuf(vp, td); | ||||
if (error) | if (error) | ||||
return error; | return error; | ||||
np->n_mtime.tv_sec = vattr.va_mtime.tv_sec; | np->n_mtime.tv_sec = vattr.va_mtime.tv_sec; | ||||
} | } | ||||
Show All 34 Lines | if (np->n_flag & NMODIFIED) { | ||||
return error; | return error; | ||||
} | } | ||||
if (ioflag & IO_APPEND) { | if (ioflag & IO_APPEND) { | ||||
#ifdef notyet | #ifdef notyet | ||||
/* | /* | ||||
* File size can be changed by another client | * File size can be changed by another client | ||||
*/ | */ | ||||
smbfs_attr_cacheremove(vp); | smbfs_attr_cacheremove(vp); | ||||
error = VOP_GETATTR(vp, &vattr, cred); | error = VOP_GETATTR(vp, 0, &vattr, cred); | ||||
if (error) return (error); | if (error) return (error); | ||||
#endif | #endif | ||||
uiop->uio_offset = np->n_size; | uiop->uio_offset = np->n_size; | ||||
} | } | ||||
} | } | ||||
if (uiop->uio_resid == 0) | if (uiop->uio_resid == 0) | ||||
return 0; | return 0; | ||||
▲ Show 20 Lines • Show All 373 Lines • Show Last 20 Lines |