NFSD: Using min/max/min_t/max_t for calculate
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:

committed by
J. Bruce Fields

parent
a497c3ba1d
commit
3c7aa15d20
@@ -2093,8 +2093,7 @@ nfsd_racache_init(int cache_size)
|
||||
if (raparm_hash[0].pb_head)
|
||||
return 0;
|
||||
nperbucket = DIV_ROUND_UP(cache_size, RAPARM_HASH_SIZE);
|
||||
if (nperbucket < 2)
|
||||
nperbucket = 2;
|
||||
nperbucket = max(2, nperbucket);
|
||||
cache_size = nperbucket * RAPARM_HASH_SIZE;
|
||||
|
||||
dprintk("nfsd: allocating %d readahead buffers.\n", cache_size);
|
||||
|
Reference in New Issue
Block a user