diff mbox

btrfs-progs: convert: Add missing return for HOLE mode when checking convert image

Message ID 20170321010055.28530-1-quwenruo@cn.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Qu Wenruo March 21, 2017, 1 a.m. UTC
In check_convert_image(), for normal HOLE case, if the file extents are
smaller than image size, we set ret to -EINVAL and print error message.

But forget to return.

This patch adds the missing return to fix it.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 convert/main.c | 1 +
 1 file changed, 1 insertion(+)

Comments

David Sterba March 27, 2017, 5:20 p.m. UTC | #1
On Tue, Mar 21, 2017 at 09:00:55AM +0800, Qu Wenruo wrote:
> In check_convert_image(), for normal HOLE case, if the file extents are
> smaller than image size, we set ret to -EINVAL and print error message.
> 
> But forget to return.
> 
> This patch adds the missing return to fix it.
> 
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/convert/main.c b/convert/main.c
index 96358c62..c56382e9 100644
--- a/convert/main.c
+++ b/convert/main.c
@@ -1559,6 +1559,7 @@  next:
 			ret = -EINVAL;
 			error("inode %llu has some file extents not checked",
 				ino);
+			return ret;
 		}
 	}