aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2009-05-30 22:11:12 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2009-05-30 22:11:12 +0000
commitd00a615a98ced78fe819bd86f186cae6bf3057a8 (patch)
treeffb5d97fe90c805bed6e8d52adbce070f4f104fd /sys
parentedd16ab14038b6863126389aab00c0966cb4e2f3 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/nfsclient/nfs_clnode.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c
index 7de639b84f56..14dcf81126f3 100644
--- a/sys/fs/nfsclient/nfs_clnode.c
+++ b/sys/fs/nfsclient/nfs_clnode.c
@@ -185,35 +185,35 @@ ncl_inactive(struct vop_inactive_args *ap)
{
struct nfsnode *np;
struct sillyrename *sp;
+ struct vnode *vp = ap->a_vp;
- np = VTONFS(ap->a_vp);
- if (prtactive && vrefcnt(ap->a_vp) != 0)
- vprint("ncl_inactive: pushing active", ap->a_vp);
+ np = VTONFS(vp);
+ if (prtactive && vrefcnt(vp) != 0)
+ vprint("ncl_inactive: pushing active", vp);
- if (NFS_ISV4(ap->a_vp)) {
+ if (NFS_ISV4(vp) && vp->v_type == VREG) {
/*
* Since mmap()'d files do I/O after VOP_CLOSE(), the NFSv4
* Close operations are delayed until now. Any dirty buffers
* must be flushed before the close, so that the stateid is
* available for the writes.
*/
- if (nfscl_mustflush(ap->a_vp))
- (void) ncl_flush(ap->a_vp, MNT_WAIT, NULL, ap->a_td,
- 1);
- (void) nfsrpc_close(ap->a_vp, 1, ap->a_td);
+ if (nfscl_mustflush(vp))
+ (void) ncl_flush(vp, MNT_WAIT, NULL, ap->a_td, 1);
+ (void) nfsrpc_close(vp, 1, ap->a_td);
}
- if (ap->a_vp->v_type != VDIR) {
+ if (vp->v_type != VDIR) {
sp = np->n_sillyrename;
np->n_sillyrename = NULL;
} else
sp = NULL;
if (sp) {
- (void)ncl_vinvalbuf(ap->a_vp, 0, ap->a_td, 1);
+ (void) ncl_vinvalbuf(vp, 0, ap->a_td, 1);
/*
* Remove the silly file that was rename'd earlier
*/
- ncl_removeit(sp, ap->a_vp);
+ ncl_removeit(sp, vp);
crfree(sp->s_cred);
vrele(sp->s_dvp);
FREE((caddr_t)sp, M_NEWNFSREQ);