Message ID | a11665db813ca271ef4fdcc4f9852aba6fcbb761.1424880058.git.dsterba@suse.cz (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index e74abb3018d4..a3c2bd77c74b 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1631,8 +1631,8 @@ again: btrfs_end_write_no_snapshoting(root); if (only_release_metadata && copied > 0) { - u64 lockstart = round_down(pos, root->sectorsize); - u64 lockend = lockstart + + lockstart = round_down(pos, root->sectorsize); + lockend = lockstart + (dirty_pages << PAGE_CACHE_SHIFT) - 1; set_extent_bit(&BTRFS_I(inode)->io_tree, lockstart,
There are lockstart and lockend defined in the function and not used after their duplicate definition scope ends, it's safe to reuse them. Signed-off-by: David Sterba <dsterba@suse.cz> --- fs/btrfs/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)