Author: rmacklem
Date: Mon May  2 00:49:47 2011
New Revision: 221310
URL: http://svn.freebsd.org/changeset/base/221310

Log:
  MFC: r220763
  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.

Modified:
  stable/8/sys/fs/nfsclient/nfs_clvnops.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c     Sun May  1 23:55:56 2011        
(r221309)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c     Mon May  2 00:49:47 2011        
(r221310)
@@ -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))
@@ -1512,7 +1515,7 @@ again:
        }
        if (error) {
                if (newvp != NULL) {
-                       vrele(newvp);
+                       vput(newvp);
                        newvp = NULL;
                }
                if (NFS_ISV34(dvp) && (fmode & O_EXCL) &&
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to