All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hfsplus: Fix code typo
@ 2022-07-22 19:51 Xin Gao
  2022-07-22 20:12 ` James Bottomley
  2022-07-22 21:32 ` Matthew Wilcox
  0 siblings, 2 replies; 4+ messages in thread
From: Xin Gao @ 2022-07-22 19:51 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: linux-kernel, Xin Gao

The double `free' is duplicated in line 498, remove one.

Signed-off-by: Xin Gao <gaoxin@cdjrlc.com>
---
 fs/hfsplus/btree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c
index 66774f4cb4fd..655cf60eabbf 100644
--- a/fs/hfsplus/btree.c
+++ b/fs/hfsplus/btree.c
@@ -495,7 +495,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
 	m = 1 << (~nidx & 7);
 	byte = data[off];
 	if (!(byte & m)) {
-		pr_crit("trying to free free bnode "
+		pr_crit("trying to free bnode "
 				"%u(%d)\n",
 			node->this, node->type);
 		kunmap(page);
-- 
2.30.2


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

* Re: [PATCH] hfsplus: Fix code typo
  2022-07-22 19:51 [PATCH] hfsplus: Fix code typo Xin Gao
@ 2022-07-22 20:12 ` James Bottomley
  2022-07-22 21:32 ` Matthew Wilcox
  1 sibling, 0 replies; 4+ messages in thread
From: James Bottomley @ 2022-07-22 20:12 UTC (permalink / raw)
  To: Xin Gao, linux-fsdevel; +Cc: linux-kernel

On Sat, 2022-07-23 at 03:51 +0800, Xin Gao wrote:
> The double `free' is duplicated in line 498, remove one.
> 
> Signed-off-by: Xin Gao <gaoxin@cdjrlc.com>
> ---
>  fs/hfsplus/btree.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c
> index 66774f4cb4fd..655cf60eabbf 100644
> --- a/fs/hfsplus/btree.c
> +++ b/fs/hfsplus/btree.c
> @@ -495,7 +495,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
>  	m = 1 << (~nidx & 7);
>  	byte = data[off];
>  	if (!(byte & m)) {
> -		pr_crit("trying to free free bnode "
> +		pr_crit("trying to free bnode "

What makes you think this message needs correcting?  The code seems to
be checking whether we're freeing an already free bnode, meaning the
message looks correct as is and the proposed change makes it incorrect.

James



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

* Re: [PATCH] hfsplus: Fix code typo
  2022-07-22 19:51 [PATCH] hfsplus: Fix code typo Xin Gao
  2022-07-22 20:12 ` James Bottomley
@ 2022-07-22 21:32 ` Matthew Wilcox
  2022-07-24 10:48   ` Harald Arnesen
  1 sibling, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2022-07-22 21:32 UTC (permalink / raw)
  To: Xin Gao; +Cc: linux-fsdevel, linux-kernel

On Sat, Jul 23, 2022 at 03:51:33AM +0800, Xin Gao wrote:
> The double `free' is duplicated in line 498, remove one.

This is wrong.  The intended meaning here is "trying to free bnode
which is already free".  Please don't send patches for code you don't
understand.

> Signed-off-by: Xin Gao <gaoxin@cdjrlc.com>
> ---
>  fs/hfsplus/btree.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c
> index 66774f4cb4fd..655cf60eabbf 100644
> --- a/fs/hfsplus/btree.c
> +++ b/fs/hfsplus/btree.c
> @@ -495,7 +495,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
>  	m = 1 << (~nidx & 7);
>  	byte = data[off];
>  	if (!(byte & m)) {
> -		pr_crit("trying to free free bnode "
> +		pr_crit("trying to free bnode "
>  				"%u(%d)\n",
>  			node->this, node->type);
>  		kunmap(page);
> -- 
> 2.30.2
> 

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

* Re: [PATCH] hfsplus: Fix code typo
  2022-07-22 21:32 ` Matthew Wilcox
@ 2022-07-24 10:48   ` Harald Arnesen
  0 siblings, 0 replies; 4+ messages in thread
From: Harald Arnesen @ 2022-07-24 10:48 UTC (permalink / raw)
  To: Matthew Wilcox, Xin Gao; +Cc: linux-fsdevel, linux-kernel


Matthew Wilcox [22/07/2022 23.32]:

> On Sat, Jul 23, 2022 at 03:51:33AM +0800, Xin Gao wrote:
>> The double `free' is duplicated in line 498, remove one.
> 
> This is wrong.  The intended meaning here is "trying to free bnode
> which is already free".  Please don't send patches for code you don't
> understand.

Perhaps inserting an "a" in the message would make it clearer?
(pr_crit("trying to free a free bnode ")
-- 
Hilsen Harald

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

end of thread, other threads:[~2022-07-24 11:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22 19:51 [PATCH] hfsplus: Fix code typo Xin Gao
2022-07-22 20:12 ` James Bottomley
2022-07-22 21:32 ` Matthew Wilcox
2022-07-24 10:48   ` Harald Arnesen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.