diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2011-04-18 00:41:23 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2011-04-18 00:41:23 +0000 |
commit | ede7d5284808ccaa2cb7ff845dd332eccbf4d0f2 (patch) | |
tree | 466b59ef29eb32a41b61d02dd6ae45541bd6db82 /sys/fs/nfsclient | |
parent | f1cdd7a4e5f9799b41a1efe0361e7d9e6d77af33 (diff) | |
download | FreeBSD-src-ede7d5284808ccaa2cb7ff845dd332eccbf4d0f2.zip FreeBSD-src-ede7d5284808ccaa2cb7ff845dd332eccbf4d0f2.tar.gz |
Add vput() calls in two places in the experimental NFS client
that would be needed if, in the future, nfscl_loadattrcache()
were to return an error. Currently nfscl_loadattrcache()
never returns an error, so these cases never currently happen.
MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsclient')
-rw-r--r-- | sys/fs/nfsclient/nfs_clvnops.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index df1b6fa..bb29f42 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1404,9 +1404,12 @@ nfs_mknodrpc(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, (void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1); if (!error) { newvp = NFSTOV(np); - if (attrflag) + if (attrflag != 0) { error = nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); + if (error != 0) + vput(newvp); + } } if (!error) { if ((cnp->cn_flags & MAKEENTRY)) @@ -1523,7 +1526,7 @@ again: } if (error) { if (newvp != NULL) { - vrele(newvp); + vput(newvp); newvp = NULL; } if (NFS_ISV34(dvp) && (fmode & O_EXCL) && |