sunrpc: move rq_local field to rq_flags
authorJeff Layton <jlayton@primarydata.com>
Wed, 19 Nov 2014 12:51:15 +0000 (07:51 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 9 Dec 2014 16:21:21 +0000 (11:21 -0500)
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/vfs.c
include/linux/sunrpc/svc.h
include/trace/events/sunrpc.h
net/sunrpc/svcsock.c

index f1999619d516138ff84cbeb907c2d12d3fa447e1..60c25850fb165a9304877c8f19e8b3485778aab4 100644 (file)
@@ -962,7 +962,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
        loff_t                  end = LLONG_MAX;
        unsigned int            pflags = current->flags;
 
-       if (rqstp->rq_local)
+       if (test_bit(RQ_LOCAL, &rqstp->rq_flags))
                /*
                 * We want less throttling in balance_dirty_pages()
                 * and shrink_inactive_list() so that nfs to
@@ -1006,7 +1006,7 @@ out_nfserr:
                err = 0;
        else
                err = nfserrno(host_err);
-       if (rqstp->rq_local)
+       if (test_bit(RQ_LOCAL, &rqstp->rq_flags))
                tsk_restore_flags(current, pflags, PF_LESS_THROTTLE);
        return err;
 }
index b60eb7c3f3f7c11a30e8a336095e348d9272bdc6..a91df9047f3241ef748926f5e48533397ff4c029 100644 (file)
@@ -254,8 +254,8 @@ struct svc_rqst {
        u32                     rq_proc;        /* procedure number */
        u32                     rq_prot;        /* IP protocol */
 #define        RQ_SECURE       (0)                     /* secure port */
+#define        RQ_LOCAL        (1)                     /* local request */
        unsigned long           rq_flags;       /* flags field */
-       unsigned short          rq_local   : 1; /* local request */
 
        void *                  rq_argp;        /* decoded arguments */
        void *                  rq_resp;        /* xdr'd results */
index 5eb5f79d97944d24b51fee4106bab22db2ea6b2c..98259f163cd8b20efb599c6de01d9b8cda82f4a6 100644 (file)
@@ -414,7 +414,8 @@ TRACE_EVENT(xs_tcp_data_recv,
 
 #define show_rqstp_flags(flags)                                \
        __print_flags(flags, "|",                       \
-               { (1UL << RQ_SECURE),   "RQ_SECURE"})
+               { (1UL << RQ_SECURE),   "RQ_SECURE"},   \
+               { (1UL << RQ_LOCAL),    "RQ_LOCAL"})
 
 TRACE_EVENT(svc_recv,
        TP_PROTO(struct svc_rqst *rqst, int status),
index f9c052d508f008c4fb74567ea8cbad13f305d497..cc331b6cf573d95340fddf0ea0e3ae8dd8ae8f3d 100644 (file)
@@ -1145,7 +1145,10 @@ static int svc_tcp_recvfrom(struct svc_rqst *rqstp)
 
        rqstp->rq_xprt_ctxt   = NULL;
        rqstp->rq_prot        = IPPROTO_TCP;
-       rqstp->rq_local       = !!test_bit(XPT_LOCAL, &svsk->sk_xprt.xpt_flags);
+       if (test_bit(XPT_LOCAL, &svsk->sk_xprt.xpt_flags))
+               set_bit(RQ_LOCAL, &rqstp->rq_flags);
+       else
+               clear_bit(RQ_LOCAL, &rqstp->rq_flags);
 
        p = (__be32 *)rqstp->rq_arg.head[0].iov_base;
        calldir = p[1];