The patch titled
nfsd4: clean up nfs4_preprocess_seqid_op
has been added to the -mm tree. Its filename is
nfsd4-clean-up-nfs4_preprocess_seqid_op.patch
Patches currently in -mm which might be from [EMAIL PROTECTED] are
coverity-sunrpc-xprt-task-null-check.patch
nfsd4-reboot-recovery-fix.patch
nfsd4-fix-syncing-of-recovery-directory.patch
nfsd4-lookup_one_len-takes-i_sem.patch
nfsd4-prevent-multiple-unlinks-of-recovery-directories.patch
nfsd4-fix-release_lockowner.patch
nfsd4-err_grace-should-bump-seqid-on-open.patch
nfsd4-err_grace-should-bump-seqid-on-lock.patch
nfsd4-stop-overusing-reclaim_bad.patch
nfsd4-comment-indentation.patch
nfsd4-fix-open_reclaim-seqid.patch
nfsd4-seqid-comments.patch
nfsd4-relax-new-lock-seqid-check.patch
nfsd4-always-update-stateid-on-open.patch
nfsd4-return-better-error-on-io-incompatible-with-open-mode.patch
nfsd4-renew-lease-on-seqid-modifying-operations.patch
nfsd4-clarify-close_lru-handling.patch
nfsd4-clean-up-nfs4_preprocess_seqid_op.patch
nfsd4-check-lock-type-against-openmode.patch
nfsd4-fix-fh_expire_type.patch
xdr-input-validation.patch
From: NeilBrown <[EMAIL PROTECTED]>
As long as we're here, do some miscellaneous cleanup.
Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]>
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
fs/nfsd/nfs4state.c | 58 ++++++++++++++++++++--------------------------------
1 files changed, 23 insertions(+), 35 deletions(-)
diff -puN fs/nfsd/nfs4state.c~nfsd4-clean-up-nfs4_preprocess_seqid_op
fs/nfsd/nfs4state.c
--- 25/fs/nfsd/nfs4state.c~nfsd4-clean-up-nfs4_preprocess_seqid_op Wed Jul
6 13:09:28 2005
+++ 25-akpm/fs/nfsd/nfs4state.c Wed Jul 6 13:09:28 2005
@@ -2165,7 +2165,6 @@ out:
static int
nfs4_preprocess_seqid_op(struct svc_fh *current_fh, u32 seqid, stateid_t
*stateid, int flags, struct nfs4_stateowner **sopp, struct nfs4_stateid **stpp,
clientid_t *lockclid)
{
- int status;
struct nfs4_stateid *stp;
struct nfs4_stateowner *sop;
@@ -2173,19 +2172,17 @@ nfs4_preprocess_seqid_op(struct svc_fh *
"stateid = (%08x/%08x/%08x/%08x)\n", seqid,
stateid->si_boot, stateid->si_stateownerid, stateid->si_fileid,
stateid->si_generation);
-
+
*stpp = NULL;
*sopp = NULL;
- status = nfserr_bad_stateid;
if (ZERO_STATEID(stateid) || ONE_STATEID(stateid)) {
printk("NFSD: preprocess_seqid_op: magic stateid!\n");
- goto out;
+ return nfserr_bad_stateid;
}
- status = nfserr_stale_stateid;
if (STALE_STATEID(stateid))
- goto out;
+ return nfserr_stale_stateid;
/*
* We return BAD_STATEID if filehandle doesn't match stateid,
* the confirmed flag is incorrecly set, or the generation
@@ -2204,8 +2201,6 @@ nfs4_preprocess_seqid_op(struct svc_fh *
goto check_replay;
}
- status = nfserr_bad_stateid;
-
/* for new lock stateowners:
* check that the lock->v.new.open_stateid
* refers to an open stateowner
@@ -2218,14 +2213,14 @@ nfs4_preprocess_seqid_op(struct svc_fh *
struct nfs4_client *clp = sop->so_client;
if (!sop->so_is_open_owner)
- goto out;
+ return nfserr_bad_stateid;
if (!cmp_clid(&clp->cl_clientid, lockclid))
- goto out;
+ return nfserr_bad_stateid;
}
if ((flags & CHECK_FH) && nfs4_check_fh(current_fh, stp)) {
printk("NFSD: preprocess_seqid_op: fh-stateid mismatch!\n");
- goto out;
+ return nfserr_bad_stateid;
}
*stpp = stp;
@@ -2239,45 +2234,38 @@ nfs4_preprocess_seqid_op(struct svc_fh *
if (seqid != sop->so_seqid)
goto check_replay;
- if (sop->so_confirmed) {
- if (flags & CONFIRM) {
- printk("NFSD: preprocess_seqid_op: expected unconfirmed
stateowner!\n");
- goto out;
- }
- }
- else {
- if (!(flags & CONFIRM)) {
- printk("NFSD: preprocess_seqid_op: stateowner not
confirmed yet!\n");
- goto out;
- }
+ if (sop->so_confirmed && flags & CONFIRM) {
+ printk("NFSD: preprocess_seqid_op: expected"
+ " unconfirmed stateowner!\n");
+ return nfserr_bad_stateid;
+ }
+ if (!sop->so_confirmed && !(flags & CONFIRM)) {
+ printk("NFSD: preprocess_seqid_op: stateowner not"
+ " confirmed yet!\n");
+ return nfserr_bad_stateid;
}
if (stateid->si_generation > stp->st_stateid.si_generation) {
printk("NFSD: preprocess_seqid_op: future stateid?!\n");
- goto out;
+ return nfserr_bad_stateid;
}
- status = nfserr_old_stateid;
if (stateid->si_generation < stp->st_stateid.si_generation) {
printk("NFSD: preprocess_seqid_op: old stateid!\n");
- goto out;
+ return nfserr_old_stateid;
}
renew_client(sop->so_client);
- status = nfs_ok;
+ return nfs_ok;
-out:
- return status;
check_replay:
if (seqid == sop->so_seqid - 1) {
printk("NFSD: preprocess_seqid_op: retransmission?\n");
/* indicate replay to calling function */
- status = NFSERR_REPLAY_ME;
- } else {
- printk("NFSD: preprocess_seqid_op: bad seqid (expected %d, got
%d\n", sop->so_seqid, seqid);
-
- *sopp = NULL;
- status = nfserr_bad_seqid;
+ return NFSERR_REPLAY_ME;
}
- goto out;
+ printk("NFSD: preprocess_seqid_op: bad seqid (expected %d, got %d)\n",
+ sop->so_seqid, seqid);
+ *sopp = NULL;
+ return nfserr_bad_seqid;
}
int
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html