Skip to content

Commit f15a5cf

Browse files
kinglongmeeJ. Bruce Fields
authored andcommitted
SUNRPC/NFSD: Change to type of bool for rq_usedeferral and rq_splice_ok
rq_usedeferral and rq_splice_ok are used as 0 and 1, just defined to bool. Signed-off-by: Kinglong Mee <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
1 parent 3c7aa15 commit f15a5cf

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

fs/nfsd/nfs4proc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
12981298
* Don't use the deferral mechanism for NFSv4; compounds make it
12991299
* too hard to avoid non-idempotency problems.
13001300
*/
1301-
rqstp->rq_usedeferral = 0;
1301+
rqstp->rq_usedeferral = false;
13021302

13031303
/*
13041304
* According to RFC3010, this takes precedence over all other errors.
@@ -1417,7 +1417,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
14171417
BUG_ON(cstate->replay_owner);
14181418
out:
14191419
/* Reset deferral mechanism for RPC deferrals */
1420-
rqstp->rq_usedeferral = 1;
1420+
rqstp->rq_usedeferral = true;
14211421
dprintk("nfsv4 compound returned %d\n", ntohl(status));
14221422
return status;
14231423
}

include/linux/sunrpc/svc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ struct svc_rqst {
236236
struct svc_cred rq_cred; /* auth info */
237237
void * rq_xprt_ctxt; /* transport specific context ptr */
238238
struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */
239-
int rq_usedeferral; /* use deferral */
239+
bool rq_usedeferral; /* use deferral */
240240

241241
size_t rq_xprt_hlen; /* xprt header len */
242242
struct xdr_buf rq_arg;
@@ -277,7 +277,7 @@ struct svc_rqst {
277277
struct auth_domain * rq_gssclient; /* "gss/"-style peer info */
278278
int rq_cachetype;
279279
struct svc_cacherep * rq_cacherep; /* cache info */
280-
int rq_splice_ok; /* turned off in gss privacy
280+
bool rq_splice_ok; /* turned off in gss privacy
281281
* to prevent encrypting page
282282
* cache pages */
283283
wait_queue_head_t rq_wait; /* synchronization */

net/sunrpc/auth_gss/svcauth_gss.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ unwrap_priv_data(struct svc_rqst *rqstp, struct xdr_buf *buf, u32 seq, struct gs
886886
u32 priv_len, maj_stat;
887887
int pad, saved_len, remaining_len, offset;
888888

889-
rqstp->rq_splice_ok = 0;
889+
rqstp->rq_splice_ok = false;
890890

891891
priv_len = svc_getnl(&buf->head[0]);
892892
if (rqstp->rq_deferred) {

net/sunrpc/svc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,9 +1086,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
10861086
goto err_short_len;
10871087

10881088
/* Will be turned off only in gss privacy case: */
1089-
rqstp->rq_splice_ok = 1;
1089+
rqstp->rq_splice_ok = true;
10901090
/* Will be turned off only when NFSv4 Sessions are used */
1091-
rqstp->rq_usedeferral = 1;
1091+
rqstp->rq_usedeferral = true;
10921092
rqstp->rq_dropme = false;
10931093

10941094
/* Setup reply header */

0 commit comments

Comments
 (0)