axonram: Fix bug in direct_access
authorMatthew Wilcox <[email protected]>
Wed, 7 Jan 2015 16:04:18 +0000 (18:04 +0200)
committerJens Axboe <[email protected]>
Wed, 14 Jan 2015 04:57:56 +0000 (21:57 -0700)
The 'pfn' returned by axonram was completely bogus, and has been since
2008.

Signed-off-by: Matthew Wilcox <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Mathieu Desnoyers <[email protected]>
Cc: [email protected]
Signed-off-by: Jens Axboe <[email protected]>
arch/powerpc/sysdev/axonram.c

index f532c92bf99dab7e4e73cd95c9249e7fd0be62c0..367533bb3d48c0e1b031e7876692c6471fbea7a1 100644 (file)
@@ -156,7 +156,7 @@ axon_ram_direct_access(struct block_device *device, sector_t sector,
        }
 
        *kaddr = (void *)(bank->ph_addr + offset);
-       *pfn = virt_to_phys(kaddr) >> PAGE_SHIFT;
+       *pfn = virt_to_phys(*kaddr) >> PAGE_SHIFT;
 
        return 0;
 }