summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-09-15 03:08:29 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-09-15 03:08:29 +0400
commit53d872e99520bbc7d83c34a416144e591ef69584 (patch)
tree313b667c43ed5bc590212e8324662d39afff9412 /fs
parent1d2ef5901483004d74947bbf78d5146c24038fe7 (diff)
parent2d2422aebc037095f77551119f795449d29befed (diff)
downloadlinux-53d872e99520bbc7d83c34a416144e591ef69584.tar.xz
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs: xfs: fix a use after free in xfs_end_io_direct_write
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_aops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 63e971e2b837..8c37dde4c521 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -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
@@ -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