From: David Sterba Date: Tue, 24 Feb 2015 18:07:26 +0000 (+0100) Subject: btrfs: remove shadowing variables in __btrfs_buffered_write X-Git-Tag: firefly_0821_release~176^2~1735^2~79^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f64c7b12f86c638f13e19de08eeb8cf888dff8f6;p=firefly-linux-kernel-4.4.55.git btrfs: remove shadowing variables in __btrfs_buffered_write 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 --- 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,