diff options
Diffstat (limited to 'fs/direct-io.c')
-rw-r--r-- | fs/direct-io.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index 901dc55e9f54..b5928a7b6a5a 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c | |||
@@ -264,15 +264,12 @@ static int dio_bio_complete(struct dio *dio, struct bio *bio); | |||
264 | /* | 264 | /* |
265 | * Asynchronous IO callback. | 265 | * Asynchronous IO callback. |
266 | */ | 266 | */ |
267 | static int dio_bio_end_aio(struct bio *bio, unsigned int bytes_done, int error) | 267 | static void dio_bio_end_aio(struct bio *bio, int error) |
268 | { | 268 | { |
269 | struct dio *dio = bio->bi_private; | 269 | struct dio *dio = bio->bi_private; |
270 | unsigned long remaining; | 270 | unsigned long remaining; |
271 | unsigned long flags; | 271 | unsigned long flags; |
272 | 272 | ||
273 | if (bio->bi_size) | ||
274 | return 1; | ||
275 | |||
276 | /* cleanup the bio */ | 273 | /* cleanup the bio */ |
277 | dio_bio_complete(dio, bio); | 274 | dio_bio_complete(dio, bio); |
278 | 275 | ||
@@ -287,8 +284,6 @@ static int dio_bio_end_aio(struct bio *bio, unsigned int bytes_done, int error) | |||
287 | aio_complete(dio->iocb, ret, 0); | 284 | aio_complete(dio->iocb, ret, 0); |
288 | kfree(dio); | 285 | kfree(dio); |
289 | } | 286 | } |
290 | |||
291 | return 0; | ||
292 | } | 287 | } |
293 | 288 | ||
294 | /* | 289 | /* |
@@ -298,21 +293,17 @@ static int dio_bio_end_aio(struct bio *bio, unsigned int bytes_done, int error) | |||
298 | * During I/O bi_private points at the dio. After I/O, bi_private is used to | 293 | * During I/O bi_private points at the dio. After I/O, bi_private is used to |
299 | * implement a singly-linked list of completed BIOs, at dio->bio_list. | 294 | * implement a singly-linked list of completed BIOs, at dio->bio_list. |
300 | */ | 295 | */ |
301 | static int dio_bio_end_io(struct bio *bio, unsigned int bytes_done, int error) | 296 | static void dio_bio_end_io(struct bio *bio, int error) |
302 | { | 297 | { |
303 | struct dio *dio = bio->bi_private; | 298 | struct dio *dio = bio->bi_private; |
304 | unsigned long flags; | 299 | unsigned long flags; |
305 | 300 | ||
306 | if (bio->bi_size) | ||
307 | return 1; | ||
308 | |||
309 | spin_lock_irqsave(&dio->bio_lock, flags); | 301 | spin_lock_irqsave(&dio->bio_lock, flags); |
310 | bio->bi_private = dio->bio_list; | 302 | bio->bi_private = dio->bio_list; |
311 | dio->bio_list = bio; | 303 | dio->bio_list = bio; |
312 | if (--dio->refcount == 1 && dio->waiter) | 304 | if (--dio->refcount == 1 && dio->waiter) |
313 | wake_up_process(dio->waiter); | 305 | wake_up_process(dio->waiter); |
314 | spin_unlock_irqrestore(&dio->bio_lock, flags); | 306 | spin_unlock_irqrestore(&dio->bio_lock, flags); |
315 | return 0; | ||
316 | } | 307 | } |
317 | 308 | ||
318 | static int | 309 | static int |