Thread (18 messages) 18 messages, 7 authors, 2021-08-20
STALE1766d

[PATCH 2/3] btrfs: remove dead comment on btrfs_add_dead_root()

From: Qu Wenruo <hidden>
Date: 2021-06-28 10:16:50
Subsystem: btrfs file system, filesystems (vfs and infrastructure), the rest · Maintainers: Chris Mason, David Sterba, Alexander Viro, Christian Brauner, Linus Torvalds

The old comment is from the initial merge of btrfs, but since commit
5d4f98a28c7d ("Btrfs: Mixed back reference  (FORWARD ROLLING FORMAT
CHANGE)") changed the behavior to not to allocate any extra memory,
the comment on the memory allocation part is out-of-date.

Fix it by removing the dead part and change it to modern behavior.

Signed-off-by: Qu Wenruo <redacted>
---
 fs/btrfs/transaction.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 73df8b81496e..29316c062237 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1319,9 +1319,10 @@ static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans)
 }
 
 /*
- * dead roots are old snapshots that need to be deleted.  This allocates
- * a dirty root struct and adds it into the list of dead roots that need to
- * be deleted
+ * Dead roots are old snapshots that need to be deleted.
+ *
+ * This helper will queue them to the dead_roots list to be deleted by
+ * cleaner thread.
  */
 void btrfs_add_dead_root(struct btrfs_root *root)
 {
-- 
2.32.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help