]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - fs/nfsd/vfs.c
NFSD: Using exp_get for export getting
[mirror_ubuntu-hirsute-kernel.git] / fs / nfsd / vfs.c
index 140c496f612c4920c9a7819556f35841357e5aaa..df7cf61f2cd3c2cfad29bef2dcd13780242400d6 100644 (file)
@@ -189,8 +189,7 @@ nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,
        dprintk("nfsd: nfsd_lookup(fh %s, %.*s)\n", SVCFH_fmt(fhp), len,name);
 
        dparent = fhp->fh_dentry;
-       exp  = fhp->fh_export;
-       exp_get(exp);
+       exp = exp_get(fhp->fh_export);
 
        /* Lookup the name, but don't follow links */
        if (isdotent(name, len)) {
@@ -2093,8 +2092,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);