Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2011 22:57:39 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r224532 - head/sys/fs/nfsclient
Message-ID:  <201107302257.p6UMvdWf018922@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Sat Jul 30 22:57:38 2011
New Revision: 224532
URL: http://svn.freebsd.org/changeset/base/224532

Log:
  The new NFS client failed to vput() the new vnode if a setattr
  failed after the file was created in nfs_create(). This would
  probably only happen during a forced dismount. The old NFS client
  does have a vput() for this case. Detected by pho during recent
  testing, where an open syscall returned with a vnode still locked.
  
  Tested by:	pho
  Approved by:	re (kib)
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsclient/nfs_clvnops.c

Modified: head/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvnops.c	Sat Jul 30 21:42:53 2011	(r224531)
+++ head/sys/fs/nfsclient/nfs_clvnops.c	Sat Jul 30 22:57:38 2011	(r224532)
@@ -1596,6 +1596,8 @@ again:
 			if (attrflag)
 				(void) nfscl_loadattrcache(&newvp, &nfsva, NULL,
 				    NULL, 0, 1);
+			if (error != 0)
+				vput(newvp);
 		}
 	}
 	if (!error) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107302257.p6UMvdWf018922>