]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/st.c
[libata ata_piix] fix native mode probe, after recent updates
[linux-2.6-omap-h63xx.git] / drivers / scsi / st.c
index 5eb54d8019b46c3afb6dd9e264676a3e8a03d376..da9766283bd7d0b9125d6cc1146f74860766c40b 100644 (file)
@@ -4526,12 +4526,16 @@ static int sgl_unmap_user_pages(struct scatterlist *sgl, const unsigned int nr_p
        int i;
 
        for (i=0; i < nr_pages; i++) {
-               if (dirtied && !PageReserved(sgl[i].page))
-                       SetPageDirty(sgl[i].page);
+               struct page *page = sgl[i].page;
+
+               /* XXX: just for debug. Remove when PageReserved is removed */
+               BUG_ON(PageReserved(page));
+               if (dirtied)
+                       SetPageDirty(page);
                /* FIXME: cache flush missing for rw==READ
                 * FIXME: call the correct reference counting function
                 */
-               page_cache_release(sgl[i].page);
+               page_cache_release(page);
        }
 
        return 0;