Patchwork libext2fs: fix return value

login
register
mail settings
Submitter Mike Frysinger
Date May 4, 2013, 5:05 a.m.
Message ID <1367643954-31340-1-git-send-email-vapier@gentoo.org>
Download mbox | patch
Permalink /patch/241425/
State Superseded
Headers show

Comments

Mike Frysinger - May 4, 2013, 5:05 a.m.
The ext2fs_test_block_bitmap_range2 func is not a void, so make sure we
return a value.  I picked EINVAL as it looks like what other things in
this func use.

URL: http://bugs.gentoo.org/467986
Reported-by: Vicente Olivert Riera <vincent@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 lib/ext2fs/gen_bitmap64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Theodore Ts'o - May 4, 2013, 11:55 p.m.
On Sat, May 04, 2013 at 01:05:54AM -0400, Mike Frysinger wrote:
> The ext2fs_test_block_bitmap_range2 func is not a void, so make sure we
> return a value.  I picked EINVAL as it looks like what other things in
> this func use.
> 
> URL: http://bugs.gentoo.org/467986
> Reported-by: Vicente Olivert Riera <vincent@gentoo.org>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

This is already fixed in e2fsprogs's git repository, in commit
0d89e5acea9.

Cheers,

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mike Frysinger - May 5, 2013, 12:58 a.m.
On Saturday 04 May 2013 19:55:03 Theodore Ts'o wrote:
> On Sat, May 04, 2013 at 01:05:54AM -0400, Mike Frysinger wrote:
> > The ext2fs_test_block_bitmap_range2 func is not a void, so make sure we
> > return a value.  I picked EINVAL as it looks like what other things in
> > this func use.
> > 
> > URL: http://bugs.gentoo.org/467986
> > Reported-by: Vicente Olivert Riera <vincent@gentoo.org>
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> 
> This is already fixed in e2fsprogs's git repository, in commit
> 0d89e5acea9.

ok, the use of "master" and "next" is weird.  i was using the normal "master" 
branch which is apparently out of date.
-mike
Andreas Dilger - May 5, 2013, 2:40 a.m.
On 2013-05-04, at 18:58, Mike Frysinger <vapier@gentoo.org> wrote:
> On Saturday 04 May 2013 19:55:03 Theodore Ts'o wrote:
>> On Sat, May 04, 2013 at 01:05:54AM -0400, Mike Frysinger wrote:
>>> The ext2fs_test_block_bitmap_range2 func is not a void, so make sure we
>>> return a value.  I picked EINVAL as it looks like what other things in
>>> this func use.
>>> 
>>> URL: http://bugs.gentoo.org/467986
>>> Reported-by: Vicente Olivert Riera <vincent@gentoo.org>
>>> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>> 
>> This is already fixed in e2fsprogs's git repository, in commit
>> 0d89e5acea9.
> 
> ok, the use of "master" and "next" is weird.  i was using the normal "master" 
> branch which is apparently out of date.

I'd have to agree. It would be great if master was merged from maint more often so that patches would apply to either.

Cheers, Andreas--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o - May 5, 2013, 2:52 a.m.
On Sat, May 04, 2013 at 08:40:21PM -0600, Andreas Dilger wrote:
> > ok, the use of "master" and "next" is weird.  i was using the normal "master" 
> > branch which is apparently out of date.
> 
> I'd have to agree. It would be great if master was merged from maint more often so that patches would apply to either.

Sorry, I merge maint into next, but sometimes I forget to bump master
up.

Fixed now.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c
index 42a97d4..44ac499 100644
--- a/lib/ext2fs/gen_bitmap64.c
+++ b/lib/ext2fs/gen_bitmap64.c
@@ -658,7 +658,7 @@  int ext2fs_test_block_bitmap_range2(ext2fs_block_bitmap bmap,
 	if ((block < bmap->start) || (block+num-1 > bmap->end)) {
 		ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_TEST, block,
 				   bmap->description);
-		return;
+		return EINVAL;
 	}
 
 	return bmap->bitmap_ops->test_clear_bmap_extent(bmap, block, num);