Skip to content

Commit e3503c5

Browse files
josefbacikkdave
authored andcommitted
btrfs-progs: clear root dirty when we update the root
We don't currently use the bit to track whether or not the root is dirty, but when we sync ctree.c it uses this bit to determine if we should add the root to the dirty list. Clear this bit when we update the root so that the dirty tracking works properly when we sync ctree.c. Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent a9599a3 commit e3503c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel-shared/transaction.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#include "kerncompat.h"
18+
#include "kernel-lib/bitops.h"
1819
#include "kernel-shared/disk-io.h"
1920
#include "kernel-shared/transaction.h"
2021
#include "kernel-shared/delayed-ref.h"
@@ -119,6 +120,7 @@ int commit_tree_roots(struct btrfs_trans_handle *trans,
119120
next = fs_info->dirty_cowonly_roots.next;
120121
list_del_init(next);
121122
root = list_entry(next, struct btrfs_root, dirty_list);
123+
clear_bit(BTRFS_ROOT_DIRTY, &root->state);
122124
ret = update_cowonly_root(trans, root);
123125
free_extent_buffer(root->commit_root);
124126
root->commit_root = NULL;

0 commit comments

Comments
 (0)