Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xfs: Fix uninitialized variable in xfs_reflink_reserve_cow_range()
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 zero, this function is called through the public iomap API. Hence fix this by preinitializing error to zero. Fixes: 2a06705 ("xfs: create delalloc extents in CoW fork") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Dave Chinner <[email protected]>
- Loading branch information