Commit d92fa5e
btrfs: use correct compare function of dirty_metadata_bytes
commit d814a49 upstream.
We use customized, nodesize batch value to update dirty_metadata_bytes.
We should also use batch version of compare function or we will easily
goto fast path and get false result from percpu_counter_compare().
Fixes: e2d8452 ("Btrfs: use percpu counter for dirty metadata count")
CC: stable@vger.kernel.org # 4.4+
Signed-off-by: Ethan Lien <ethanlien@synology.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
nb: Rebased on 4.4.y ]
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent d1f7cdc commit d92fa5e
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1096 | 1096 | | |
1097 | 1097 | | |
1098 | 1098 | | |
1099 | | - | |
1100 | | - | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
1101 | 1102 | | |
1102 | 1103 | | |
1103 | 1104 | | |
| |||
4107 | 4108 | | |
4108 | 4109 | | |
4109 | 4110 | | |
4110 | | - | |
4111 | | - | |
| 4111 | + | |
| 4112 | + | |
| 4113 | + | |
4112 | 4114 | | |
4113 | 4115 | | |
4114 | 4116 | | |
| |||
0 commit comments