Commit e36d114
btrfs: simplify logic to decrement snapshot counter at btrfs_mksnapshot()
There's no point in having a 'snapshot_force_cow' variable to track if we
need to decrement the root->snapshot_force_cow counter, as we never jump
to the 'out' label after incrementing the counter. Simplify this by
removing the variable and always decrementing the counter before the 'out'
label, right after the call to btrfs_mksubvol().
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent a20725e commit e36d114
1 file changed
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1049 | 1049 | | |
1050 | 1050 | | |
1051 | 1051 | | |
1052 | | - | |
1053 | 1052 | | |
1054 | 1053 | | |
1055 | 1054 | | |
| |||
1068 | 1067 | | |
1069 | 1068 | | |
1070 | 1069 | | |
1071 | | - | |
1072 | 1070 | | |
1073 | 1071 | | |
1074 | 1072 | | |
1075 | 1073 | | |
1076 | 1074 | | |
| 1075 | + | |
1077 | 1076 | | |
1078 | | - | |
1079 | | - | |
1080 | 1077 | | |
1081 | 1078 | | |
1082 | 1079 | | |
| |||
0 commit comments