diff options
author | Jeff Layton <jlayton@primarydata.com> | 2014-11-19 13:51:14 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-12-09 17:21:20 +0100 |
commit | 4d152e2c9a6a3e3556ce5da7782a9e2836edbe0f (patch) | |
tree | 3c3b778275aaeed90a0e81a708508e113bab606d /fs/nfsd/nfscache.c | |
parent | Merge tag 'nfs-for-3.19-1' into nfsd for-3.19 branch (diff) | |
download | linux-4d152e2c9a6a3e3556ce5da7782a9e2836edbe0f.tar.xz linux-4d152e2c9a6a3e3556ce5da7782a9e2836edbe0f.zip |
sunrpc: add a generic rq_flags field to svc_rqst and move rq_secure to it
In a later patch, we're going to need some atomic bit flags. Since that
field will need to be an unsigned long, we mitigate that space
consumption by migrating some other bitflags to the new field. Start
with the rq_secure flag.
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfscache.c')
-rw-r--r-- | fs/nfsd/nfscache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c index 122f69185ef5..83a9694ec485 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c @@ -490,7 +490,7 @@ found_entry: /* From the hall of fame of impractical attacks: * Is this a user who tries to snoop on the cache? */ rtn = RC_DOIT; - if (!rqstp->rq_secure && rp->c_secure) + if (!test_bit(RQ_SECURE, &rqstp->rq_flags) && rp->c_secure) goto out; /* Compose RPC reply header */ @@ -579,7 +579,7 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp) spin_lock(&b->cache_lock); drc_mem_usage += bufsize; lru_put_end(b, rp); - rp->c_secure = rqstp->rq_secure; + rp->c_secure = test_bit(RQ_SECURE, &rqstp->rq_flags); rp->c_type = cachetype; rp->c_state = RC_DONE; spin_unlock(&b->cache_lock); |