Updated micscif/micscif_api.c to new location for atomic_t element.
authorAaron Taylor <ataylor@subgeniuskitty.com>
Sun, 2 May 2021 04:46:55 +0000 (21:46 -0700)
committerAaron Taylor <ataylor@subgeniuskitty.com>
Sun, 2 May 2021 04:46:55 +0000 (21:46 -0700)
micscif/micscif_api.c

index c5dff5c..a318a73 100644 (file)
@@ -2433,13 +2433,13 @@ scif_put_pages(struct scif_range *pages)
        int ret;
        struct reg_range_t *window = pages->cookie;
        struct endpt *ep = (struct endpt *)window->ep;
        int ret;
        struct reg_range_t *window = pages->cookie;
        struct endpt *ep = (struct endpt *)window->ep;
-       if (atomic_read(&(&(ep->ref_count))->refcount) > 0) {
+       if (atomic_read(&(&(&(ep->ref_count))->refcount)->refs) > 0) {
                kref_get(&(ep->ref_count));
        } else {
                WARN_ON(1);
        }
        ret = __scif_put_pages(pages);
                kref_get(&(ep->ref_count));
        } else {
                WARN_ON(1);
        }
        ret = __scif_put_pages(pages);
-       if (atomic_read(&(&(ep->ref_count))->refcount) > 0) {
+       if (atomic_read(&(&(&(ep->ref_count))->refcount)->refs) > 0) {
                kref_put(&(ep->ref_count), scif_ref_rel);
        } else {
                //WARN_ON(1);
                kref_put(&(ep->ref_count), scif_ref_rel);
        } else {
                //WARN_ON(1);