Date: Mon, 18 Apr 2011 01:02:43 +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: r220764 - head/sys/fs/nfsclient Message-ID: <201104180102.p3I12hZZ054775@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Mon Apr 18 01:02:43 2011 New Revision: 220764 URL: http://svn.freebsd.org/changeset/base/220764 Log: Add a vput() to nfs_lookitup() in the experimental NFS client for a case that will probably never happen. It can only happen if a server were to successfully lookup a file, but not return attributes for that file. Although technically allowed by the NFSv3 RFC, I doubt any server would ever do this. However, if it did, the client would have not vput()'d the new vnode when it needed to do so. 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 Mon Apr 18 00:41:23 2011 (r220763) +++ head/sys/fs/nfsclient/nfs_clvnops.c Mon Apr 18 01:02:43 2011 (r220764) @@ -2433,7 +2433,10 @@ printf("replace=%s\n",nnn); newvp = NFSTOV(np); } if (!attrflag && *npp == NULL) { - vrele(newvp); + if (newvp == dvp) + vrele(newvp); + else + vput(newvp); return (ENOENT); } if (attrflag)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104180102.p3I12hZZ054775>