Author: rmacklem
Date: Mon Apr 18 00:41:23 2011
New Revision: 220763
URL: http://svn.freebsd.org/changeset/base/220763

Log:
  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

Modified:
  head/sys/fs/nfsclient/nfs_clvnops.c

Modified: head/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvnops.c Sun Apr 17 23:56:57 2011        
(r220762)
+++ head/sys/fs/nfsclient/nfs_clvnops.c Mon Apr 18 00:41:23 2011        
(r220763)
@@ -1404,9 +1404,12 @@ nfs_mknodrpc(struct vnode *dvp, struct v
                (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) &&
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to