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
parent
8885e7f3d7
commit
57b7d61c2d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue