Re: [PATCH] xfs: Fix uninitialized variable in xfs_reflink_reserve_cow_range()

2016-10-17 Thread Darrick J. Wong
On Mon, Oct 17, 2016 at 12:16:44PM +0200, Geert Uytterhoeven wrote: > with gcc 4.1.2: > > fs/xfs/xfs_reflink.c: In function ‘xfs_reflink_reserve_cow_range’: > fs/xfs/xfs_reflink.c:327: warning: ‘error’ may be used uninitialized in > this function > > Indeed, if "count" is zero, the

Re: [PATCH] xfs: Fix uninitialized variable in xfs_reflink_reserve_cow_range()

2016-10-17 Thread Darrick J. Wong
On Mon, Oct 17, 2016 at 12:16:44PM +0200, Geert Uytterhoeven wrote: > with gcc 4.1.2: > > fs/xfs/xfs_reflink.c: In function ‘xfs_reflink_reserve_cow_range’: > fs/xfs/xfs_reflink.c:327: warning: ‘error’ may be used uninitialized in > this function > > Indeed, if "count" is zero, the

Re: [PATCH] xfs: Fix uninitialized variable in xfs_reflink_reserve_cow_range()

2016-10-17 Thread Geert Uytterhoeven
Hi Christoph, On Mon, Oct 17, 2016 at 2:08 PM, Christoph Hellwig wrote: > On Mon, Oct 17, 2016 at 12:16:44PM +0200, Geert Uytterhoeven wrote: >> with gcc 4.1.2: >> >> fs/xfs/xfs_reflink.c: In function ‘xfs_reflink_reserve_cow_range’: >> fs/xfs/xfs_reflink.c:327:

Re: [PATCH] xfs: Fix uninitialized variable in xfs_reflink_reserve_cow_range()

2016-10-17 Thread Geert Uytterhoeven
Hi Christoph, On Mon, Oct 17, 2016 at 2:08 PM, Christoph Hellwig wrote: > On Mon, Oct 17, 2016 at 12:16:44PM +0200, Geert Uytterhoeven wrote: >> with gcc 4.1.2: >> >> fs/xfs/xfs_reflink.c: In function ‘xfs_reflink_reserve_cow_range’: >> fs/xfs/xfs_reflink.c:327: warning: ‘error’ may be

Re: [PATCH] xfs: Fix uninitialized variable in xfs_reflink_reserve_cow_range()

2016-10-17 Thread Christoph Hellwig
On Mon, Oct 17, 2016 at 12:16:44PM +0200, Geert Uytterhoeven wrote: > with gcc 4.1.2: > > fs/xfs/xfs_reflink.c: In function ‘xfs_reflink_reserve_cow_range’: > fs/xfs/xfs_reflink.c:327: warning: ‘error’ may be used uninitialized in > this function > > Indeed, if "count" is zero, the

Re: [PATCH] xfs: Fix uninitialized variable in xfs_reflink_reserve_cow_range()

2016-10-17 Thread Christoph Hellwig
On Mon, Oct 17, 2016 at 12:16:44PM +0200, Geert Uytterhoeven wrote: > with gcc 4.1.2: > > fs/xfs/xfs_reflink.c: In function ‘xfs_reflink_reserve_cow_range’: > fs/xfs/xfs_reflink.c:327: warning: ‘error’ may be used uninitialized in > this function > > Indeed, if "count" is zero, the

[PATCH] xfs: Fix uninitialized variable in xfs_reflink_reserve_cow_range()

2016-10-17 Thread Geert Uytterhoeven
with gcc 4.1.2: fs/xfs/xfs_reflink.c: In function ‘xfs_reflink_reserve_cow_range’: fs/xfs/xfs_reflink.c:327: warning: ‘error’ may be used uninitialized in this function Indeed, if "count" is zero, the function will return an uninitialized error value. While "count" is unlikely to be

[PATCH] xfs: Fix uninitialized variable in xfs_reflink_reserve_cow_range()

2016-10-17 Thread Geert Uytterhoeven
with gcc 4.1.2: fs/xfs/xfs_reflink.c: In function ‘xfs_reflink_reserve_cow_range’: fs/xfs/xfs_reflink.c:327: warning: ‘error’ may be used uninitialized in this function Indeed, if "count" is zero, the function will return an uninitialized error value. While "count" is unlikely to be