aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 3aeb2106e119..0839e4a1cfac 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1535,7 +1535,8 @@ int btrfs_sync_fs(struct super_block *sb, int wait)
* Exit unless we have some pending changes
* that need to go through commit
*/
- if (fs_info->pending_changes == 0)
+ if (!test_bit(BTRFS_FS_NEED_TRANS_COMMIT,
+ &fs_info->flags))
return 0;
/*
* A non-blocking test if the fs is frozen. We must not