kern/177335: commit references a PR
dfilter service
dfilter at FreeBSD.ORG
Wed May 29 00:40:01 UTC 2013
The following reply was made to PR kern/177335; it has been noted by GNATS.
From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: kern/177335: commit references a PR
Date: Wed, 29 May 2013 00:32:57 +0000 (UTC)
Author: rmacklem
Date: Wed May 29 00:32:49 2013
New Revision: 251089
URL: http://svnweb.freebsd.org/changeset/base/251089
Log:
Add a patch analygous to r248567, r248581, r251079 to the
old NFS client to avoid the panic reported in the PR by
doing the vnode_pager_setsize() call after unlocking the mutex.
PR: 177335
MFC after: 2 weeks
Modified:
head/sys/nfsclient/nfs_subs.c
Modified: head/sys/nfsclient/nfs_subs.c
==============================================================================
--- head/sys/nfsclient/nfs_subs.c Wed May 29 00:19:58 2013 (r251088)
+++ head/sys/nfsclient/nfs_subs.c Wed May 29 00:32:49 2013 (r251089)
@@ -463,6 +463,8 @@ nfs_loadattrcache(struct vnode **vpp, st
struct timespec mtime, mtime_save;
int v3 = NFS_ISV3(vp);
int error = 0;
+ u_quad_t nsize;
+ int setnsize;
md = *mdp;
t1 = (mtod(md, caddr_t) + md->m_len) - *dposp;
@@ -565,6 +567,8 @@ nfs_loadattrcache(struct vnode **vpp, st
vap->va_filerev = 0;
}
np->n_attrstamp = time_second;
+ setnsize = 0;
+ nsize = 0;
if (vap->va_size != np->n_size) {
if (vap->va_type == VREG) {
if (dontshrink && vap->va_size < np->n_size) {
@@ -591,7 +595,8 @@ nfs_loadattrcache(struct vnode **vpp, st
np->n_size = vap->va_size;
np->n_flag |= NSIZECHANGED;
}
- vnode_pager_setsize(vp, np->n_size);
+ setnsize = 1;
+ nsize = vap->va_size;
} else {
np->n_size = vap->va_size;
}
@@ -628,6 +633,8 @@ nfs_loadattrcache(struct vnode **vpp, st
KDTRACE_NFS_ATTRCACHE_LOAD_DONE(vp, &np->n_vattr, 0);
#endif
mtx_unlock(&np->n_mtx);
+ if (setnsize)
+ vnode_pager_setsize(vp, nsize);
out:
#ifdef KDTRACE_HOOKS
if (error)
_______________________________________________
svn-src-all at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
More information about the freebsd-fs
mailing list