Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1580683 > unrolled thread

[PATCH] xfs: fix len comparison in xfs_extent_busy_trim

Started byArnd Bergmann <arnd@arndb.de>
First post2017-02-14 18:10 +0100
Last post2017-02-15 03:20 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] xfs: fix len comparison in xfs_extent_busy_trim Arnd Bergmann <arnd@arndb.de> - 2017-02-14 18:10 +0100
    Re: [PATCH] xfs: fix len comparison in xfs_extent_busy_trim Christoph Hellwig <hch@lst.de> - 2017-02-14 20:20 +0100
    Re: [PATCH] xfs: fix len comparison in xfs_extent_busy_trim "Darrick J. Wong" <darrick.wong@oracle.com> - 2017-02-15 03:20 +0100

#1580683 — [PATCH] xfs: fix len comparison in xfs_extent_busy_trim

FromArnd Bergmann <arnd@arndb.de>
Date2017-02-14 18:10 +0100
Subject[PATCH] xfs: fix len comparison in xfs_extent_busy_trim
Message-ID<taOM2-4Ah-41@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1580764

FromChristoph Hellwig <hch@lst.de>
Date2017-02-14 20:20 +0100
Message-ID<taQNQ-5Oq-13@gated-at.bofh.it>
In reply to#1580683
Thanks Arnd, this looks good:

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

[toc] | [prev] | [next] | [standalone]


#1581000

From"Darrick J. Wong" <darrick.wong@oracle.com>
Date2017-02-15 03:20 +0100
Message-ID<taXmh-1AR-3@gated-at.bofh.it>
In reply to#1580683
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
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web