Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257383
b: refs/heads/master
c: 72c5052
h: refs/heads/master
i:
  257381: acdf69b
  257379: 216dc06
  257375: af62bae
v: v3
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Jul 21, 2011
1 parent 9caa37d commit 079fe29
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aacfc19c626ebd3daa675652457d71019a1f583f
refs/heads/master: 72c5052ddc3956d847f21c2b8d55c93664a51b2c
7 changes: 4 additions & 3 deletions trunk/fs/direct-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,12 @@ static ssize_t dio_complete(struct dio *dio, loff_t offset, ssize_t ret, bool is
if (dio->end_io && dio->result) {
dio->end_io(dio->iocb, offset, transferred,
dio->map_bh.b_private, ret, is_async);
} else if (is_async) {
aio_complete(dio->iocb, ret, 0);
} else {
if (is_async)
aio_complete(dio->iocb, ret, 0);
inode_dio_done(dio->inode);
}

inode_dio_done(dio->inode);
return ret;
}

Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3573,6 +3573,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
ssize_t size, void *private, int ret,
bool is_async)
{
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
ext4_io_end_t *io_end = iocb->private;
struct workqueue_struct *wq;
unsigned long flags;
Expand All @@ -3594,6 +3595,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
out:
if (is_async)
aio_complete(iocb, ret, 0);
inode_dio_done(inode);
return;
}

Expand All @@ -3614,6 +3616,9 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
/* queue the work to convert unwritten extents to written */
queue_work(wq, &io_end->work);
iocb->private = NULL;

/* XXX: probably should move into the real I/O completion handler */
inode_dio_done(inode);
}

static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate)
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ocfs2/aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ static void ocfs2_dio_end_io(struct kiocb *iocb,

if (is_async)
aio_complete(iocb, ret, 0);
inode_dio_done(inode);
}

/*
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,6 +1339,9 @@ xfs_end_io_direct_write(
} else {
xfs_finish_ioend_sync(ioend);
}

/* XXX: probably should move into the real I/O completion handler */
inode_dio_done(ioend->io_inode);
}

STATIC ssize_t
Expand Down

0 comments on commit 079fe29

Please sign in to comment.