diff mbox

xfs: fix len comparison in xfs_extent_busy_trim

Message ID 20170214170836.2705798-1-arnd@arndb.de (mailing list archive)
State Accepted
Headers show

Commit Message

Arnd Bergmann Feb. 14, 2017, 5:08 p.m. UTC
The length is now passed by reference, so the assertion has to be updated
to match the other changes, as pointed out by this W=1 warning:

fs/xfs/xfs_extent_busy.c: In function 'xfs_extent_busy_trim':
fs/xfs/xfs_extent_busy.c:356:13: error: ordered comparison of pointer with integer zero [-Werror=extra]

Fixes: ebf55872616c ("xfs: improve handling of busy extents in the low-level allocator")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 fs/xfs/xfs_extent_busy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig Feb. 14, 2017, 7:11 p.m. UTC | #1
Thanks Arnd, this looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Darrick J. Wong Feb. 15, 2017, 2:17 a.m. UTC | #2
On Tue, Feb 14, 2017 at 06:08:30PM +0100, Arnd Bergmann wrote:
> The length is now passed by reference, so the assertion has to be updated
> to match the other changes, as pointed out by this W=1 warning:
> 
> fs/xfs/xfs_extent_busy.c: In function 'xfs_extent_busy_trim':
> fs/xfs/xfs_extent_busy.c:356:13: error: ordered comparison of pointer with integer zero [-Werror=extra]
> 
> Fixes: ebf55872616c ("xfs: improve handling of busy extents in the low-level allocator")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks, applied (4.11).

--D

> ---
>  fs/xfs/xfs_extent_busy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_extent_busy.c b/fs/xfs/xfs_extent_busy.c
> index ab062610234e..77760dbf0242 100644
> --- a/fs/xfs/xfs_extent_busy.c
> +++ b/fs/xfs/xfs_extent_busy.c
> @@ -353,7 +353,7 @@ xfs_extent_busy_trim(
>  	struct rb_node		*rbp;
>  	bool			ret = false;
>  
> -	ASSERT(len > 0);
> +	ASSERT(*len > 0);
>  
>  	spin_lock(&args->pag->pagb_lock);
>  restart:
> -- 
> 2.9.0
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" 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/fs/xfs/xfs_extent_busy.c b/fs/xfs/xfs_extent_busy.c
index ab062610234e..77760dbf0242 100644
--- a/fs/xfs/xfs_extent_busy.c
+++ b/fs/xfs/xfs_extent_busy.c
@@ -353,7 +353,7 @@  xfs_extent_busy_trim(
 	struct rb_node		*rbp;
 	bool			ret = false;
 
-	ASSERT(len > 0);
+	ASSERT(*len > 0);
 
 	spin_lock(&args->pag->pagb_lock);
 restart: