diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-08 18:22:47 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-08 21:02:42 +0100 |
commit | 2d4594acbf6d8f75a27f3578476b6a27d8b13ebb (patch) | |
tree | 0cb700c7c026748b47afee0b25c8d3c3e255b6c6 /fs/direct-io.c | |
parent | 9p: ->evict_inode() should kick out ->i_data, not ->i_mapping (diff) | |
download | linux-2d4594acbf6d8f75a27f3578476b6a27d8b13ebb.tar.xz linux-2d4594acbf6d8f75a27f3578476b6a27d8b13ebb.zip |
fix the regression from "direct-io: Fix negative return from dio read beyond eof"
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...
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/direct-io.c')
-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 1c75a3a07f8f..602e8441bc0f 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -1175,6 +1175,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; } |