svn commit: r317579 - in stable/10/sys/fs: nfs nfsclient

Rick Macklem rmacklem at FreeBSD.org
Sat Apr 29 01:04:41 UTC 2017


Author: rmacklem
Date: Sat Apr 29 01:04:39 2017
New Revision: 317579
URL: https://svnweb.freebsd.org/changeset/base/317579

Log:
  MFC: r316829
  Remove unused "cred" argument to ncl_flush().
  
  The "cred" argument of ncl_flush() is unused and it was confusing to have
  the code passing in NULL for this argument in some cases. This patch deletes
  this argument.
  There is no semantic change because of this patch.

Modified:
  stable/10/sys/fs/nfs/nfs_var.h
  stable/10/sys/fs/nfsclient/nfs_clnode.c
  stable/10/sys/fs/nfsclient/nfs_clstate.c
  stable/10/sys/fs/nfsclient/nfs_clvnops.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfs/nfs_var.h
==============================================================================
--- stable/10/sys/fs/nfs/nfs_var.h	Sat Apr 29 00:53:17 2017	(r317578)
+++ stable/10/sys/fs/nfs/nfs_var.h	Sat Apr 29 01:04:39 2017	(r317579)
@@ -592,7 +592,7 @@ int nfscl_maperr(NFSPROC_T *, int, uid_t
 void nfscl_init(void);
 
 /* nfs_clbio.c */
-int ncl_flush(vnode_t, int, struct ucred *, NFSPROC_T *, int, int);
+int ncl_flush(vnode_t, int, NFSPROC_T *, int, int);
 
 /* nfs_clnode.c */
 void ncl_invalcaches(vnode_t);

Modified: stable/10/sys/fs/nfsclient/nfs_clnode.c
==============================================================================
--- stable/10/sys/fs/nfsclient/nfs_clnode.c	Sat Apr 29 00:53:17 2017	(r317578)
+++ stable/10/sys/fs/nfsclient/nfs_clnode.c	Sat Apr 29 01:04:39 2017	(r317579)
@@ -250,7 +250,7 @@ ncl_inactive(struct vop_inactive_args *a
 		} else
 			retv = TRUE;
 		if (retv == TRUE) {
-			(void)ncl_flush(vp, MNT_WAIT, NULL, ap->a_td, 1, 0);
+			(void)ncl_flush(vp, MNT_WAIT, ap->a_td, 1, 0);
 			(void)nfsrpc_close(vp, 1, ap->a_td);
 		}
 	}

Modified: stable/10/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- stable/10/sys/fs/nfsclient/nfs_clstate.c	Sat Apr 29 00:53:17 2017	(r317578)
+++ stable/10/sys/fs/nfsclient/nfs_clstate.c	Sat Apr 29 01:04:39 2017	(r317579)
@@ -3878,8 +3878,7 @@ nfscl_recalldeleg(struct nfsclclient *cl
 	if ((dp->nfsdl_flags & NFSCLDL_WRITE) && (np->n_flag & NMODIFIED)) {
 		np->n_flag |= NDELEGRECALL;
 		NFSUNLOCKNODE(np);
-		ret = ncl_flush(vp, MNT_WAIT, cred, p, 1,
-		    called_from_renewthread);
+		ret = ncl_flush(vp, MNT_WAIT, p, 1, called_from_renewthread);
 		NFSLOCKNODE(np);
 		np->n_flag &= ~NDELEGRECALL;
 	}

Modified: stable/10/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/10/sys/fs/nfsclient/nfs_clvnops.c	Sat Apr 29 00:53:17 2017	(r317578)
+++ stable/10/sys/fs/nfsclient/nfs_clvnops.c	Sat Apr 29 01:04:39 2017	(r317579)
@@ -721,12 +721,12 @@ nfs_close(struct vop_close_args *ap)
 		     * traditional vnode locking implemented for Vnode Ops.
 		     */
 		    int cm = newnfs_commit_on_close ? 1 : 0;
-		    error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td, cm, 0);
+		    error = ncl_flush(vp, MNT_WAIT, ap->a_td, cm, 0);
 		    /* np->n_flag &= ~NMODIFIED; */
 		} else if (NFS_ISV4(vp)) { 
 			if (nfscl_mustflush(vp) != 0) {
 				int cm = newnfs_commit_on_close ? 1 : 0;
-				error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td,
+				error = ncl_flush(vp, MNT_WAIT, ap->a_td,
 				    cm, 0);
 				/*
 				 * as above w.r.t races when clearing
@@ -2629,7 +2629,7 @@ nfs_fsync(struct vop_fsync_args *ap)
 		 */
 		return (0);
 	}
-	return (ncl_flush(ap->a_vp, ap->a_waitfor, NULL, ap->a_td, 1, 0));
+	return (ncl_flush(ap->a_vp, ap->a_waitfor, ap->a_td, 1, 0));
 }
 
 /*
@@ -2641,7 +2641,7 @@ nfs_fsync(struct vop_fsync_args *ap)
  * waiting for a buffer write to complete.
  */
 int
-ncl_flush(struct vnode *vp, int waitfor, struct ucred *cred, struct thread *td,
+ncl_flush(struct vnode *vp, int waitfor, struct thread *td,
     int commit, int called_from_renewthread)
 {
 	struct nfsnode *np = VTONFS(vp);
@@ -3022,7 +3022,7 @@ nfs_advlock(struct vop_advlock_args *ap)
 		if (ap->a_op == F_UNLCK &&
 		    nfscl_checkwritelocked(vp, ap->a_fl, cred, td, ap->a_id,
 		    ap->a_flags))
-			(void) ncl_flush(vp, MNT_WAIT, cred, td, 1, 0);
+			(void) ncl_flush(vp, MNT_WAIT, td, 1, 0);
 
 		/*
 		 * Loop around doing the lock op, while a blocking lock


More information about the svn-src-all mailing list