@@ -122,8 +122,6 @@ struct dio {
loff_t i_size; /* i_size when submitted */
dio_iodone_t *end_io; /* IO completion function */
- void *private; /* copy from map_bh.b_private */
-
/* BIO completion state */
spinlock_t bio_lock; /* protects BIO fields below */
int page_errors; /* errno from get_user_pages() */
@@ -288,7 +286,7 @@ static ssize_t dio_complete(struct dio *dio, ssize_t ret, unsigned int flags)
if (dio->end_io) {
// XXX: ki_pos??
- err = dio->end_io(dio->iocb, offset, ret, dio->private);
+ err = dio->end_io(dio->iocb, offset, ret);
if (err)
ret = err;
}
@@ -716,9 +714,6 @@ static int get_more_blocks(struct dio *dio, struct dio_submit *sdio,
ret = (*sdio->get_block)(dio->iocb, dio->inode, fs_startblk,
map_bh, create);
- /* Store for completion */
- dio->private = map_bh->b_private;
-
if (ret == 0 && buffer_defer_completion(map_bh))
ret = dio_set_defer_completion(dio);
}
@@ -3612,8 +3612,7 @@ const struct iomap_ops ext4_iomap_ops = {
.iomap_end = ext4_iomap_end,
};
-static int ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
- ssize_t size, void *private)
+static int ext4_end_io_dio(struct kiocb *iocb, loff_t offset, ssize_t size)
{
ext4_io_end_t *io_end = iocb->private;
@@ -2404,10 +2404,7 @@ static int ocfs2_dio_end_io_write(struct inode *inode,
* particularly interested in the aio/dio case. We use the rw_lock DLM lock
* to protect io on one node from truncation on another.
*/
-static int ocfs2_dio_end_io(struct kiocb *iocb,
- loff_t offset,
- ssize_t bytes,
- void *private)
+static int ocfs2_dio_end_io(struct kiocb *iocb, loff_t offset, ssize_t bytes)
{
struct ocfs2_dio_write_ctxt *dwc;
struct inode *inode = file_inode(iocb->ki_filp);
@@ -83,8 +83,7 @@ typedef int (get_block_t)(struct inode *inode, sector_t iblock,
typedef int (dio_get_block_t)(struct kiocb *iocb, struct inode *inode,
sector_t iblock, struct buffer_head *bh_result,
int create);
-typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
- ssize_t bytes, void *private);
+typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset, ssize_t bytes);
#define MAY_EXEC 0x00000001
#define MAY_WRITE 0x00000002