linux-stable/net/sunrpc
Frank Sorenson 34ae685cb3 sunrpc: Fix bit count when setting hashtable size to power-of-two
Author: Frank Sorenson <sorenson@redhat.com>
Date:   2016-06-27 13:55:48 -0500

    sunrpc: Fix bit count when setting hashtable size to power-of-two

    The hashtable size is incorrectly calculated as the next higher
    power-of-two when being set to a power-of-two.  fls() returns the
    bit number of the most significant set bit, with the least
    significant bit being numbered '1'.  For a power-of-two, fls()
    will return a bit number which is one higher than the number of bits
    required, leading to a hashtable which is twice the requested size.

    In addition, the value of (1 << nbits) will always be at least num,
    so the test will never be true.

    Fix the hash table size calculation to correctly set hashtable
    size, and eliminate the unnecessary check.

    Signed-off-by: Frank Sorenson <sorenson@redhat.com>

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2016-07-19 16:23:26 -04:00
..
auth_gss sunrpc: move NO_CRKEY_TIMEOUT to the auth->au_flags 2016-07-19 16:23:24 -04:00
xprtrdma NFS client updates for Linux 4.7 2016-05-26 10:33:33 -07:00
addr.c
auth_generic.c sunrpc: move NO_CRKEY_TIMEOUT to the auth->au_flags 2016-07-19 16:23:24 -04:00
auth_null.c sunrpc: move NO_CRKEY_TIMEOUT to the auth->au_flags 2016-07-19 16:23:24 -04:00
auth_unix.c sunrpc: move NO_CRKEY_TIMEOUT to the auth->au_flags 2016-07-19 16:23:24 -04:00
auth.c sunrpc: Fix bit count when setting hashtable size to power-of-two 2016-07-19 16:23:26 -04:00
backchannel_rqst.c
cache.c
clnt.c rpc: share one xps between all backchannels 2016-06-15 10:32:25 -04:00
debugfs.c
Kconfig
Makefile
netns.h
rpc_pipe.c
rpcb_clnt.c
sched.c
socklib.c
stats.c
sunrpc_syms.c
sunrpc.h
svc_xprt.c rpc: share one xps between all backchannels 2016-06-15 10:32:25 -04:00
svc.c
svcauth_unix.c
svcauth.c
svcsock.c
sysctl.c
timer.c
xdr.c
xprt.c
xprtmultipath.c
xprtsock.c rpc: share one xps between all backchannels 2016-06-15 10:32:25 -04:00