Commit 92198f7eaa5df3479341dd8fa20c2c81aa3b1e25
Committed by
Linus Torvalds
1 parent
16c29b67fb
Exists in
master
and in
4 other branches
[PATCH] pass iocb to dio_iodone_t
XFS will have to look at iocb->private to fix aio+dio. No other filesystem is using the blockdev_direct_IO* end_io callback. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 3 changed files with 5 additions and 4 deletions Side-by-side Diff
fs/direct-io.c
| ... | ... | @@ -215,7 +215,7 @@ |
| 215 | 215 | static void dio_complete(struct dio *dio, loff_t offset, ssize_t bytes) |
| 216 | 216 | { |
| 217 | 217 | if (dio->end_io && dio->result) |
| 218 | - dio->end_io(dio->inode, offset, bytes, dio->map_bh.b_private); | |
| 218 | + dio->end_io(dio->iocb, offset, bytes, dio->map_bh.b_private); | |
| 219 | 219 | if (dio->lock_type == DIO_LOCKING) |
| 220 | 220 | up_read(&dio->inode->i_alloc_sem); |
| 221 | 221 | } |
fs/xfs/linux-2.6/xfs_aops.c
| ... | ... | @@ -149,11 +149,12 @@ |
| 149 | 149 | */ |
| 150 | 150 | STATIC void |
| 151 | 151 | linvfs_unwritten_convert_direct( |
| 152 | - struct inode *inode, | |
| 152 | + struct kiocb *iocb, | |
| 153 | 153 | loff_t offset, |
| 154 | 154 | ssize_t size, |
| 155 | 155 | void *private) |
| 156 | 156 | { |
| 157 | + struct inode *inode = iocb->ki_filp->f_dentry->d_inode; | |
| 157 | 158 | ASSERT(!private || inode == (struct inode *)private); |
| 158 | 159 | |
| 159 | 160 | /* private indicates an unwritten extent lay beneath this IO */ |
include/linux/fs.h
| ... | ... | @@ -220,6 +220,7 @@ |
| 220 | 220 | |
| 221 | 221 | struct iovec; |
| 222 | 222 | struct nameidata; |
| 223 | +struct kiocb; | |
| 223 | 224 | struct pipe_inode_info; |
| 224 | 225 | struct poll_table_struct; |
| 225 | 226 | struct kstatfs; |
| ... | ... | @@ -240,7 +241,7 @@ |
| 240 | 241 | typedef int (get_blocks_t)(struct inode *inode, sector_t iblock, |
| 241 | 242 | unsigned long max_blocks, |
| 242 | 243 | struct buffer_head *bh_result, int create); |
| 243 | -typedef void (dio_iodone_t)(struct inode *inode, loff_t offset, | |
| 244 | +typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, | |
| 244 | 245 | ssize_t bytes, void *private); |
| 245 | 246 | |
| 246 | 247 | /* |
| ... | ... | @@ -302,7 +303,6 @@ |
| 302 | 303 | struct page; |
| 303 | 304 | struct address_space; |
| 304 | 305 | struct writeback_control; |
| 305 | -struct kiocb; | |
| 306 | 306 | |
| 307 | 307 | struct address_space_operations { |
| 308 | 308 | int (*writepage)(struct page *page, struct writeback_control *wbc); |