Skip to contentSkip to conversation

FAILED: patch "[PATCH] fix the regression from "direct-io: Fix negative return from" failed to apply to 3.14-stable tree

PATCH [email protected] 1 participant 1 message Jan 27, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 3.14-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From 2d4594acbf6d8f75a27f3578476b6a27d8b13ebb Mon Sep 17 00:00:00 2001

From: Al Viro <[email protected]>
Date: Tue, 8 Dec 2015 12:22:47 -0500
Subject: [PATCH] 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...

fs/direct-io.c +1 -0
index 1c75a3a07f8f..602e8441bc0f 100644
@@ -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;
 	}