summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2011-04-18 01:02:43 +0000
committerrmacklem <rmacklem@FreeBSD.org>2011-04-18 01:02:43 +0000
commit54869edbdff39659216f7167e5c54d6c2de25896 (patch)
tree8bdb3b6b09c591204c51e497a0b8d9071e1cb7c7
parentede7d5284808ccaa2cb7ff845dd332eccbf4d0f2 (diff)
downloadFreeBSD-src-54869edbdff39659216f7167e5c54d6c2de25896.zip
FreeBSD-src-54869edbdff39659216f7167e5c54d6c2de25896.tar.gz
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
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index bb29f42..cc9563a 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -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)
OpenPOWER on IntegriCloud