diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2014-06-10 12:08:19 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-06-23 17:31:36 +0200 |
commit | 3c7aa15d2073d81e56e8ba8771a4ab6f23be7ae2 (patch) | |
tree | f76a11c503dd24636dbd36dfb9a58aa3d76ad54e /fs/nfsd/vfs.c | |
parent | Linux 3.16-rc2 (diff) | |
download | linux-3c7aa15d2073d81e56e8ba8771a4ab6f23be7ae2.tar.xz linux-3c7aa15d2073d81e56e8ba8771a4ab6f23be7ae2.zip |
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>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 140c496f612c..7498099b382f 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -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); |