mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] bcachefs: Remove the unused variable journal_flags
@ 2023-11-15  3:13 Jiapeng Chong
  2023-11-15  3:43 ` Kent Overstreet
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2023-11-15  3:13 UTC (permalink / raw)
  To: kent.overstreet
  Cc: bfoster, linux-bcachefs, linux-kernel, Jiapeng Chong, Abaci Robot

Variable journal_flags is not effectively used, so delete it.

fs/bcachefs/btree_update_interior.c:1057:11: warning: variable 'journal_flags' set but not used.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7559
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 fs/bcachefs/btree_update_interior.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c
index 9affcb22d9cb..18e5a75142e9 100644
--- a/fs/bcachefs/btree_update_interior.c
+++ b/fs/bcachefs/btree_update_interior.c
@@ -1054,7 +1054,6 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,
 	unsigned nr_nodes[2] = { 0, 0 };
 	unsigned update_level = level;
 	enum bch_watermark watermark = flags & BCH_WATERMARK_MASK;
-	unsigned journal_flags = 0;
 	int ret = 0;
 	u32 restart_count = trans->restart_count;
 
@@ -1068,10 +1067,6 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,
 	flags &= ~BCH_WATERMARK_MASK;
 	flags |= watermark;
 
-	if (flags & BCH_TRANS_COMMIT_journal_reclaim)
-		journal_flags |= JOURNAL_RES_GET_NONBLOCK;
-	journal_flags |= watermark;
-
 	while (1) {
 		nr_nodes[!!update_level] += 1 + split;
 		update_level++;
-- 
2.20.1.7.g153144c


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

* Re: [PATCH] bcachefs: Remove the unused variable journal_flags
  2023-11-15  3:13 [PATCH] bcachefs: Remove the unused variable journal_flags Jiapeng Chong
@ 2023-11-15  3:43 ` Kent Overstreet
  0 siblings, 0 replies; 2+ messages in thread
From: Kent Overstreet @ 2023-11-15  3:43 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: bfoster, linux-bcachefs, linux-kernel, Abaci Robot

On Wed, Nov 15, 2023 at 11:13:29AM +0800, Jiapeng Chong wrote:
> Variable journal_flags is not effectively used, so delete it.
> 
> fs/bcachefs/btree_update_interior.c:1057:11: warning: variable 'journal_flags' set but not used.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7559
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  fs/bcachefs/btree_update_interior.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c
> index 9affcb22d9cb..18e5a75142e9 100644
> --- a/fs/bcachefs/btree_update_interior.c
> +++ b/fs/bcachefs/btree_update_interior.c
> @@ -1054,7 +1054,6 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,
>  	unsigned nr_nodes[2] = { 0, 0 };
>  	unsigned update_level = level;
>  	enum bch_watermark watermark = flags & BCH_WATERMARK_MASK;
> -	unsigned journal_flags = 0;
>  	int ret = 0;
>  	u32 restart_count = trans->restart_count;
>  
> @@ -1068,10 +1067,6 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path,
>  	flags &= ~BCH_WATERMARK_MASK;
>  	flags |= watermark;
>  
> -	if (flags & BCH_TRANS_COMMIT_journal_reclaim)
> -		journal_flags |= JOURNAL_RES_GET_NONBLOCK;
> -	journal_flags |= watermark;
> -
>  	while (1) {
>  		nr_nodes[!!update_level] += 1 + split;
>  		update_level++;
> -- 
> 2.20.1.7.g153144c
> 

Yup, this is a leftover from deleting journal pre-reservations.

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

end of thread, other threads:[~2023-11-15  3:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-15  3:13 [PATCH] bcachefs: Remove the unused variable journal_flags Jiapeng Chong
2023-11-15  3:43 ` Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®