From owner-svn-src-head@FreeBSD.ORG Sat Jul 30 22:57:39 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34143106564A; Sat, 30 Jul 2011 22:57:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23FB88FC15; Sat, 30 Jul 2011 22:57:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6UMvdNl018924; Sat, 30 Jul 2011 22:57:39 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6UMvdWf018922; Sat, 30 Jul 2011 22:57:39 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201107302257.p6UMvdWf018922@svn.freebsd.org> From: Rick Macklem Date: Sat, 30 Jul 2011 22:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224532 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2011 22:57:39 -0000 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) {