diff options
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index f3f61d1ad18a..bcfb4a27ddd4 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -1629,13 +1629,11 @@ again: | |||
1629 | * managed to copy. | 1629 | * managed to copy. |
1630 | */ | 1630 | */ |
1631 | if (num_sectors > dirty_sectors) { | 1631 | if (num_sectors > dirty_sectors) { |
1632 | /* | 1632 | |
1633 | * we round down because we don't want to count | 1633 | /* release everything except the sectors we dirtied */ |
1634 | * any partial blocks actually sent through the | 1634 | release_bytes -= dirty_sectors << |
1635 | * IO machines | 1635 | root->fs_info->sb->s_blocksize_bits; |
1636 | */ | 1636 | |
1637 | release_bytes = round_down(release_bytes - copied, | ||
1638 | root->sectorsize); | ||
1639 | if (copied > 0) { | 1637 | if (copied > 0) { |
1640 | spin_lock(&BTRFS_I(inode)->lock); | 1638 | spin_lock(&BTRFS_I(inode)->lock); |
1641 | BTRFS_I(inode)->outstanding_extents++; | 1639 | BTRFS_I(inode)->outstanding_extents++; |