dax: drop size parameter to ->direct_access()
authorDan Williams <dan.j.williams@intel.com>
Fri, 7 Aug 2015 21:41:00 +0000 (17:41 -0400)
committerDan Williams <dan.j.williams@intel.com>
Thu, 27 Aug 2015 23:40:58 +0000 (19:40 -0400)
None of the implementations currently use it.  The common
bdev_direct_access() entry point handles all the size checks before
calling ->direct_access().

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
arch/powerpc/sysdev/axonram.c
drivers/block/brd.c
drivers/nvdimm/pmem.c
drivers/s390/block/dcssblk.c
fs/block_dev.c
include/linux/blkdev.h

index a2be2a66dab6d1e27d28eda4d062bc3ce4ec5b99..4419c84ac15ae07dc6af3c5fd23483efac9c5a67 100644 (file)
@@ -141,7 +141,7 @@ axon_ram_make_request(struct request_queue *queue, struct bio *bio)
  */
 static long
 axon_ram_direct_access(struct block_device *device, sector_t sector,
-                      void __pmem **kaddr, unsigned long *pfn, long size)
+                      void __pmem **kaddr, unsigned long *pfn)
 {
        struct axon_ram_bank *bank = device->bd_disk->private_data;
        loff_t offset = (loff_t)sector << AXON_RAM_SECTOR_SHIFT;
index c96402fd156059e2e29a3881f6db7a4912f16f6a..03c45c41bdfa84e455468c3b5f836626f5541b25 100644 (file)
@@ -371,7 +371,7 @@ static int brd_rw_page(struct block_device *bdev, sector_t sector,
 
 #ifdef CONFIG_BLK_DEV_RAM_DAX
 static long brd_direct_access(struct block_device *bdev, sector_t sector,
-                       void __pmem **kaddr, unsigned long *pfn, long size)
+                       void __pmem **kaddr, unsigned long *pfn)
 {
        struct brd_device *brd = bdev->bd_disk->private_data;
        struct page *page;
@@ -384,10 +384,6 @@ static long brd_direct_access(struct block_device *bdev, sector_t sector,
        *kaddr = (void __pmem *)page_address(page);
        *pfn = page_to_pfn(page);
 
-       /*
-        * TODO: If size > PAGE_SIZE, we could look to see if the next page in
-        * the file happens to be mapped to the next page of physical RAM.
-        */
        return PAGE_SIZE;
 }
 #else
index f3b629779266aacdbb221de683792e21940b1e42..3b5b9cb758b646782c15ae40a9834c00e01e82f0 100644 (file)
@@ -92,7 +92,7 @@ static int pmem_rw_page(struct block_device *bdev, sector_t sector,
 }
 
 static long pmem_direct_access(struct block_device *bdev, sector_t sector,
-                     void __pmem **kaddr, unsigned long *pfn, long size)
+                     void __pmem **kaddr, unsigned long *pfn)
 {
        struct pmem_device *pmem = bdev->bd_disk->private_data;
        size_t offset = sector << 9;
index 2c5a397b9f3e7e7ac71519aaeb5d51758f33371f..8c027a9e4e8a4cace8d8002e4142e640f7e228a2 100644 (file)
@@ -29,7 +29,7 @@ static int dcssblk_open(struct block_device *bdev, fmode_t mode);
 static void dcssblk_release(struct gendisk *disk, fmode_t mode);
 static void dcssblk_make_request(struct request_queue *q, struct bio *bio);
 static long dcssblk_direct_access(struct block_device *bdev, sector_t secnum,
-                        void __pmem **kaddr, unsigned long *pfn, long size);
+                        void __pmem **kaddr, unsigned long *pfn);
 
 static char dcssblk_segments[DCSSBLK_PARM_LEN] = "\0";
 
@@ -879,7 +879,7 @@ fail:
 
 static long
 dcssblk_direct_access (struct block_device *bdev, sector_t secnum,
-                       void __pmem **kaddr, unsigned long *pfn, long size)
+                       void __pmem **kaddr, unsigned long *pfn)
 {
        struct dcssblk_dev_info *dev_info;
        unsigned long offset, dev_sz;
index 2345a9870e2ca75a30a97c842e8f3192bbfa78ff..3831e5691b322dddb2a072c97cb4a852f741c1ad 100644 (file)
@@ -462,7 +462,7 @@ long bdev_direct_access(struct block_device *bdev, sector_t sector,
        sector += get_start_sect(bdev);
        if (sector % (PAGE_SIZE / 512))
                return -EINVAL;
-       avail = ops->direct_access(bdev, sector, addr, pfn, size);
+       avail = ops->direct_access(bdev, sector, addr, pfn);
        if (!avail)
                return -ERANGE;
        return min(avail, size);
index c401ecdff9cb4588022af12ebbe46b8595115722..c22064f326b29cf862b20624bb16d9500a35d3fd 100644 (file)
@@ -1556,7 +1556,7 @@ struct block_device_operations {
        int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
        int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);
        long (*direct_access)(struct block_device *, sector_t, void __pmem **,
-                       unsigned long *pfn, long size);
+                       unsigned long *pfn);
        unsigned int (*check_events) (struct gendisk *disk,
                                      unsigned int clearing);
        /* ->media_changed() is DEPRECATED, use ->check_events() instead */