Commit 06777d30 authored by Al Viro's avatar Al Viro

dio: fix use-after-free

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 718deb6b
...@@ -1206,7 +1206,7 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, ...@@ -1206,7 +1206,7 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
* NOTE: filesystems with their own locking have to handle this * NOTE: filesystems with their own locking have to handle this
* on their own. * on their own.
*/ */
if (dio->flags & DIO_LOCKING) { if (flags & DIO_LOCKING) {
if (unlikely((rw & WRITE) && retval < 0)) { if (unlikely((rw & WRITE) && retval < 0)) {
loff_t isize = i_size_read(inode); loff_t isize = i_size_read(inode);
if (end > isize) if (end > isize)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment