J. Bruce Fields | 8 Jun 2005 20:31

[PATCH 1 of 4] nfsd4-move-find-delegation-file

Somehow a couple functions got reordered here, making the compiler complain.

Signed-off-by: J. Bruce Fields <bfields <at> citi.umich.edu>
---

 linux-2.6.12-rc6-mm1-bfields/fs/nfsd/nfs4state.c |   42 +++++++++++------------
 1 files changed, 21 insertions(+), 21 deletions(-)

diff -puN fs/nfsd/nfs4state.c~nfsd4-move-nfs4-check-deleg fs/nfsd/nfs4state.c
--- linux-2.6.12-rc6-mm1/fs/nfsd/nfs4state.c~nfsd4-move-nfs4-check-deleg	2005-06-08
14:12:47.000000000 -0400
+++ linux-2.6.12-rc6-mm1-bfields/fs/nfsd/nfs4state.c	2005-06-08 14:12:47.000000000 -0400
 <at>  <at>  -1535,6 +1535,27  <at>  <at>  out:
 	return status;
 }

+static inline int
+nfs4_check_delegmode(struct nfs4_delegation *dp, int flags)
+{
+	if ((flags & WR_STATE) && (dp->dl_type == NFS4_OPEN_DELEGATE_READ))
+		return nfserr_openmode;
+	else
+		return nfs_ok;
+}
+
+static struct nfs4_delegation *
+find_delegation_file(struct nfs4_file *fp, stateid_t *stid)
+{
+	struct nfs4_delegation *dp;
+
+	list_for_each_entry(dp, &fp->fi_delegations, dl_perfile) {
+		if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid)
+			return dp;
+	}
+	return NULL;
+}
+
 static int
 nfs4_check_deleg(struct nfs4_file *fp, struct nfsd4_open *open,
 		struct nfs4_delegation **dp)
 <at>  <at>  -1559,27 +1580,6  <at>  <at>  out:
 	return nfs_ok;
 }

-static inline int
-nfs4_check_delegmode(struct nfs4_delegation *dp, int flags)
-{
-	if ((flags & WR_STATE) && (dp->dl_type == NFS4_OPEN_DELEGATE_READ))
-		return nfserr_openmode;
-	else
-		return nfs_ok;
-}
-
-static struct nfs4_delegation *
-find_delegation_file(struct nfs4_file *fp, stateid_t *stid)
-{
-	struct nfs4_delegation *dp;
-
-	list_for_each_entry(dp, &fp->fi_delegations, dl_perfile) {
-		if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid)
-			return dp;
-	}
-	return NULL;
-}
-
 static int
 nfs4_check_open(struct nfs4_file *fp, struct nfsd4_open *open, struct nfs4_stateid **stpp)
 {
_

Gmane