Skip to contentSkip to conversation

fs-writeback: remove unnecessary ‘false’ values from wakeup_bdi

PATCH In review Li zeming 2 participants 2 messages Feb 6, 2023 – Feb 17, 2023 VFS

lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 fs-writeback: remove unnecessary ‘false’ values from wakeup_bdi

wakeup_bdi does not need to be initialized. It is used after being assigned.

---
 fs/fs-writeback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fs-writeback.c +1 -1
index 6fba5a52127b..2d3191d9c736 100644
@@ -2486,7 +2486,7 @@ void __mark_inode_dirty(struct inode *inode, int flags)
 		 */
 		if (!was_dirty) {
 			struct list_head *dirty_list;
-			bool wakeup_bdi = false;
+			bool wakeup_bdi;
 
 			inode->dirtied_when = jiffies;
 			if (dirtytime)
Signature · 1 line
2.18.2
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Li zeming

wakeup_bdi does not need to be initialized. It is used after being assigned.

Looks good to me. Feel free to add:

Honza

Quoted 20 lines
---
 fs/fs-writeback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fs-writeback.c +1 -1
index 6fba5a52127b..2d3191d9c736 100644
@@ -2486,7 +2486,7 @@ void __mark_inode_dirty(struct inode *inode, int flags)
 		 */
 		if (!was_dirty) {
 			struct list_head *dirty_list;
-			bool wakeup_bdi = false;
+			bool wakeup_bdi;
 
 			inode->dirtied_when = jiffies;
 			if (dirtytime)
Signature · 1 line
2.18.2
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR