Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Browse files Browse the repository at this point in the history
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: fix a use after free in xfs_end_io_direct_write
  • Loading branch information
torvalds committed Sep 14, 2011
2 parents 1d2ef59 + 2d2422a commit 53d872e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/xfs/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,7 @@ xfs_end_io_direct_write(
bool is_async)
{
struct xfs_ioend *ioend = iocb->private;
struct inode *inode = ioend->io_inode;

/*
* blockdev_direct_IO can return an error even after the I/O
Expand Down Expand Up @@ -1331,7 +1332,7 @@ xfs_end_io_direct_write(
}

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

STATIC ssize_t
Expand Down

0 comments on commit 53d872e

Please sign in to comment.