svn commit: r220764 - head/sys/fs/nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Mon Apr 18 01:02:44 UTC 2011
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)
More information about the svn-src-all
mailing list