]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/nfs/nfs_srvcache.c
xnu-2050.7.9.tar.gz
[apple/xnu.git] / bsd / nfs / nfs_srvcache.c
index 7fde3da6b04711bb9838a6f0712c89dec13ad60b..b0eb21d7347c56ba600c315f6cd06cb4eedf22d1 100644 (file)
@@ -253,10 +253,10 @@ loop:
                        if (rp->rc_state == RC_UNUSED)
                                panic("nfsrv cache");
                        if (rp->rc_state == RC_INPROG) {
                        if (rp->rc_state == RC_UNUSED)
                                panic("nfsrv cache");
                        if (rp->rc_state == RC_INPROG) {
-                               OSAddAtomic(1, &nfsstats.srvcache_inproghits);
+                               OSAddAtomic64(1, &nfsstats.srvcache_inproghits);
                                ret = RC_DROPIT;
                        } else if (rp->rc_flag & RC_REPSTATUS) {
                                ret = RC_DROPIT;
                        } else if (rp->rc_flag & RC_REPSTATUS) {
-                               OSAddAtomic(1, &nfsstats.srvcache_nonidemdonehits);
+                               OSAddAtomic64(1, &nfsstats.srvcache_nonidemdonehits);
                                nd->nd_repstat = rp->rc_status;
                                error = nfsrv_rephead(nd, slp, &nmrep, 0);
                                if (error) {
                                nd->nd_repstat = rp->rc_status;
                                error = nfsrv_rephead(nd, slp, &nmrep, 0);
                                if (error) {
@@ -268,7 +268,7 @@ loop:
                                        *mrepp = nmrep.nmc_mhead;
                                }
                        } else if (rp->rc_flag & RC_REPMBUF) {
                                        *mrepp = nmrep.nmc_mhead;
                                }
                        } else if (rp->rc_flag & RC_REPMBUF) {
-                               OSAddAtomic(1, &nfsstats.srvcache_nonidemdonehits);
+                               OSAddAtomic64(1, &nfsstats.srvcache_nonidemdonehits);
                                error = mbuf_copym(rp->rc_reply, 0, MBUF_COPYALL, MBUF_WAITOK, mrepp);
                                if (error) {
                                        printf("nfsrv cache: reply copym failed for nonidem request hit\n");
                                error = mbuf_copym(rp->rc_reply, 0, MBUF_COPYALL, MBUF_WAITOK, mrepp);
                                if (error) {
                                        printf("nfsrv cache: reply copym failed for nonidem request hit\n");
@@ -277,7 +277,7 @@ loop:
                                        ret = RC_REPLY;
                                }
                        } else {
                                        ret = RC_REPLY;
                                }
                        } else {
-                               OSAddAtomic(1, &nfsstats.srvcache_idemdonehits);
+                               OSAddAtomic64(1, &nfsstats.srvcache_idemdonehits);
                                rp->rc_state = RC_INPROG;
                                ret = RC_DOIT;
                        }
                                rp->rc_state = RC_INPROG;
                                ret = RC_DOIT;
                        }
@@ -290,7 +290,7 @@ loop:
                        return (ret);
                }
        }
                        return (ret);
                }
        }
-       OSAddAtomic(1, &nfsstats.srvcache_misses);
+       OSAddAtomic64(1, &nfsstats.srvcache_misses);
        if (nfsrv_reqcache_count < nfsrv_reqcache_size) {
                /* try to allocate a new entry */
                MALLOC(rp, struct nfsrvcache *, sizeof *rp, M_NFSD, M_WAITOK);
        if (nfsrv_reqcache_count < nfsrv_reqcache_size) {
                /* try to allocate a new entry */
                MALLOC(rp, struct nfsrvcache *, sizeof *rp, M_NFSD, M_WAITOK);