1
0
Fork 0

fix the regression from "direct-io: Fix negative return from dio read beyond eof"

commit 2d4594acbf upstream.

Sure, it's better to bail out of past-the-eof read and return 0 than return
a bogus negative value on such.  Only we'd better make sure we are bailing out
with 0 and not -ENOMEM...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
wifi-calibration
Al Viro 2015-12-08 12:22:47 -05:00 committed by Greg Kroah-Hartman
parent 8885e7f3d7
commit 57b7d61c2d
1 changed files with 1 additions and 0 deletions

View File

@ -1165,6 +1165,7 @@ do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
if (dio->flags & DIO_LOCKING)
mutex_unlock(&inode->i_mutex);
kmem_cache_free(dio_cache, dio);
retval = 0;
goto out;
}