]> git.neil.brown.name Git - history.git/commitdiff
ALSA CVS update
authorJaroslav Kysela <perex@suse.cz>
Thu, 25 Sep 2003 16:40:46 +0000 (18:40 +0200)
committerJaroslav Kysela <perex@suse.cz>
Thu, 25 Sep 2003 16:40:46 +0000 (18:40 +0200)
D:2003/08/31 20:47:16
C:PCM Midlevel
A:Jaroslav Kysela <perex@suse.cz>
F:core/pcm_native.c:1.78->1.79
L:get_page() fix

sound/core/pcm_native.c

index f82b4f5cfce0645ae39b06debc97ed4879fbc8cb..4a7faecdc00b58b464a1671994a34045b90536d4 100644 (file)
@@ -2791,7 +2791,8 @@ static struct page * snd_pcm_mmap_status_nopage(struct vm_area_struct *area, uns
                return NOPAGE_OOM;
        runtime = substream->runtime;
        page = virt_to_page(runtime->status);
-       get_page(page);
+       if (!PageReserved(page))
+               get_page(page);
        return page;
 }
 
@@ -2828,7 +2829,8 @@ static struct page * snd_pcm_mmap_control_nopage(struct vm_area_struct *area, un
                return NOPAGE_OOM;
        runtime = substream->runtime;
        page = virt_to_page(runtime->control);
-       get_page(page);
+       if (!PageReserved(page))
+               get_page(page);
        return page;
 }
 
@@ -2893,7 +2895,8 @@ static struct page * snd_pcm_mmap_data_nopage(struct vm_area_struct *area, unsig
                vaddr = runtime->dma_area + offset;
                page = virt_to_page(vaddr);
        }
-       get_page(page);
+       if (!PageReserved(page))
+               get_page(page);
        return page;
 }