diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-08 12:22:47 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-31 11:25:55 -0800 |
commit | cb5cfacf626064f41d8fc1a9d5bf51f02bbfdd78 (patch) | |
tree | c5df072677e8e38a0bc63508c71030f48d4d67d3 | |
parent | 9c8c46046edba54532225f61291ecc162d24cf70 (diff) | |
download | linux-rt-cb5cfacf626064f41d8fc1a9d5bf51f02bbfdd78.tar.gz |
fix the regression from "direct-io: Fix negative return from dio read beyond eof"
commit 2d4594acbf6d8f75a27f3578476b6a27d8b13ebb 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>
-rw-r--r-- | fs/direct-io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index 8897af41ae90..3e116320f01b 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -1167,6 +1167,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; } |