* [PATCH] btrfs-progs: convert: Add missing return for HOLE mode when checking convert image
@ 2017-03-21 1:00 Qu Wenruo
2017-03-27 17:20 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Qu Wenruo @ 2017-03-21 1:00 UTC (permalink / raw)
To: linux-btrfs; +Cc: dsterba
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(+)
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;
}
}
--
2.12.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs-progs: convert: Add missing return for HOLE mode when checking convert image
2017-03-21 1:00 [PATCH] btrfs-progs: convert: Add missing return for HOLE mode when checking convert image Qu Wenruo
@ 2017-03-27 17:20 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2017-03-27 17:20 UTC (permalink / raw)
To: Qu Wenruo; +Cc: linux-btrfs, dsterba
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-27 17:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-21 1:00 [PATCH] btrfs-progs: convert: Add missing return for HOLE mode when checking convert image Qu Wenruo
2017-03-27 17:20 ` David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.