From 8af6746a8f9a15eb93fd94443203722b29d1ce5b Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Tue, 6 Dec 2011 11:34:35 +0100 Subject: [PATCH] kernel/nfs: Don't free 'info' until we're finished using it. --- sys/vfs/nfs/nfs_bio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/vfs/nfs/nfs_bio.c b/sys/vfs/nfs/nfs_bio.c index eba7a17755..13be1aaeea 100644 --- a/sys/vfs/nfs/nfs_bio.c +++ b/sys/vfs/nfs/nfs_bio.c @@ -35,7 +35,6 @@ * * @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95 * $FreeBSD: /repoman/r/ncvs/src/sys/nfsclient/nfs_bio.c,v 1.130 2004/04/14 23:23:55 peadar Exp $ - * $DragonFly: src/sys/vfs/nfs/nfs_bio.c,v 1.45 2008/07/18 00:09:39 dillon Exp $ */ @@ -1728,7 +1727,6 @@ nfs_commitrpc_bio_done(nfsm_info_t info) * error occurred. */ nfsmout: - kfree(info, M_NFSREQ); if (error == 0) { bp->b_dirtyoff = bp->b_dirtyend = 0; bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK); @@ -1737,6 +1735,7 @@ nfsmout: } else { nfs_writerpc_bio(info->vp, bio); } + kfree(info, M_NFSREQ); lwkt_reltoken(&nmp->nm_token); } -- 2.41.0