linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs: fix len comparison in xfs_extent_busy_trim
@ 2017-02-14 17:08 Arnd Bergmann
  2017-02-14 19:11 ` Christoph Hellwig
  2017-02-15  2:17 ` Darrick J. Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-02-14 17:08 UTC (permalink / raw)
  To: Darrick J. Wong, linux-xfs
  Cc: Christoph Hellwig, Arnd Bergmann, Dave Chinner, Brian Foster,
	linux-kernel

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(-)

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs: fix len comparison in xfs_extent_busy_trim
  2017-02-14 17:08 [PATCH] xfs: fix len comparison in xfs_extent_busy_trim Arnd Bergmann
@ 2017-02-14 19:11 ` Christoph Hellwig
  2017-02-15  2:17 ` Darrick J. Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2017-02-14 19:11 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Darrick J. Wong, linux-xfs, Christoph Hellwig, Dave Chinner,
	Brian Foster, linux-kernel

Thanks Arnd, this looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs: fix len comparison in xfs_extent_busy_trim
  2017-02-14 17:08 [PATCH] xfs: fix len comparison in xfs_extent_busy_trim Arnd Bergmann
  2017-02-14 19:11 ` Christoph Hellwig
@ 2017-02-15  2:17 ` Darrick J. Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2017-02-15  2:17 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-xfs, Christoph Hellwig, Dave Chinner, Brian Foster, linux-kernel

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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-15  2:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-14 17:08 [PATCH] xfs: fix len comparison in xfs_extent_busy_trim Arnd Bergmann
2017-02-14 19:11 ` Christoph Hellwig
2017-02-15  2:17 ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).