View | Details | Raw Unified | Return to bug 259071 | Differences between
and this patch

Collapse All | Expand All

(-)sys/fs/nfsclient/nfs_clbio.c (-1 / +3 lines)
Lines 917-924 ncl_write(struct vop_write_args *ap) Link Here
917
		np->n_flag &= ~NWRITEERR;
917
		np->n_flag &= ~NWRITEERR;
918
		NFSUNLOCKNODE(np);
918
		NFSUNLOCKNODE(np);
919
		return (np->n_error);
919
		return (np->n_error);
920
	} else
920
	} else {
921
		np->n_flag |= NMODLOCALLY;
921
		NFSUNLOCKNODE(np);
922
		NFSUNLOCKNODE(np);
923
	}
922
	mtx_lock(&nmp->nm_mtx);
924
	mtx_lock(&nmp->nm_mtx);
923
	if ((nmp->nm_flag & NFSMNT_NFSV3) != 0 &&
925
	if ((nmp->nm_flag & NFSMNT_NFSV3) != 0 &&
924
	    (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) {
926
	    (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) {
(-)sys/fs/nfsclient/nfs_clnode.c (-1 / +1 lines)
Lines 277-283 ncl_inactive(struct vop_inactive_args *ap) Link Here
277
	 * should be done to the DS.
277
	 * should be done to the DS.
278
	 * None of the other flags are meaningful after the vnode is unused.
278
	 * None of the other flags are meaningful after the vnode is unused.
279
	 */
279
	 */
280
	np->n_flag &= (NMODIFIED | NDSCOMMIT);
280
	np->n_flag &= (NMODIFIED | NDSCOMMIT | NMODLOCALLY);
281
	NFSUNLOCKNODE(np);
281
	NFSUNLOCKNODE(np);
282
	return (0);
282
	return (0);
283
}
283
}
(-)sys/fs/nfsclient/nfs_clvnops.c (+9 lines)
Lines 1066-1071 nfs_setattr(struct vop_setattr_args *ap) Link Here
1066
			 * value.
1066
			 * value.
1067
			 */
1067
			 */
1068
			NFSLOCKNODE(np);
1068
			NFSLOCKNODE(np);
1069
			np->n_flag |= NMODLOCALLY;
1069
			tsize = np->n_size;
1070
			tsize = np->n_size;
1070
			NFSUNLOCKNODE(np);
1071
			NFSUNLOCKNODE(np);
1071
			error = ncl_meta_setsize(vp, td, vap->va_size);
1072
			error = ncl_meta_setsize(vp, td, vap->va_size);
Lines 1358-1363 nfs_lookup(struct vop_lookup_args *ap) Link Here
1358
		    LK_EXCLUSIVE);
1359
		    LK_EXCLUSIVE);
1359
		if (error)
1360
		if (error)
1360
			return (error);
1361
			return (error);
1362
		NFSLOCKNODE(np);
1363
		if ((np->n_flag & NMODLOCALLY) != 0)
1364
			attrflag = 0;
1365
		NFSUNLOCKNODE(np);
1361
		newvp = NFSTOV(np);
1366
		newvp = NFSTOV(np);
1362
		if (attrflag)
1367
		if (attrflag)
1363
			(void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL,
1368
			(void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL,
Lines 1417-1422 nfs_lookup(struct vop_lookup_args *ap) Link Here
1417
		    cnp->cn_lkflags);
1422
		    cnp->cn_lkflags);
1418
		if (error)
1423
		if (error)
1419
			return (error);
1424
			return (error);
1425
		NFSLOCKNODE(np);
1426
		if ((np->n_flag & NMODLOCALLY) != 0)
1427
			attrflag = 0;
1428
		NFSUNLOCKNODE(np);
1420
		newvp = NFSTOV(np);
1429
		newvp = NFSTOV(np);
1421
		if (attrflag)
1430
		if (attrflag)
1422
			(void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL,
1431
			(void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL,
(-)sys/fs/nfsclient/nfsnode.h (+1 lines)
Lines 166-171 struct nfsnode { Link Here
166
#define	NDSCOMMIT	0x00100000  /* Commit is done via the DS. */
166
#define	NDSCOMMIT	0x00100000  /* Commit is done via the DS. */
167
#define	NVNSETSZSKIP	0x00200000  /* Skipped vnode_pager_setsize() */
167
#define	NVNSETSZSKIP	0x00200000  /* Skipped vnode_pager_setsize() */
168
#define	NMIGHTBELOCKED	0x00400000  /* Might be file locked. */
168
#define	NMIGHTBELOCKED	0x00400000  /* Might be file locked. */
169
#define	NMODLOCALLY	0x00800000  /* File modified locally. */
169
170
170
/*
171
/*
171
 * Convert between nfsnode pointers and vnode pointers
172
 * Convert between nfsnode pointers and vnode pointers

Return to bug 259071