diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-10-31 11:55:01 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-11-18 17:51:47 +0100 |
commit | 3ec17a67cc340b7b0353d7ac6d2746dcf8983b43 (patch) | |
tree | 8fa3661fdc9687e1965e311e16c3b48ab464d64f /fs/btrfs | |
parent | btrfs: Streamline btrfs_fs_info::backup_root_index semantics (diff) | |
download | linux-3ec17a67cc340b7b0353d7ac6d2746dcf8983b43.tar.xz linux-3ec17a67cc340b7b0353d7ac6d2746dcf8983b43.zip |
btrfs: clean up locking name in scrub_enumerate_chunks()
The "&fs_info->dev_replace.rwsem" and "&dev_replace->rwsem" refer to
the same lock but Smatch is not clever enough to figure that out so it
leads to static checker warnings. It's better to use it consistently
anyway.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/scrub.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 4a5a4e4ef707..06494304ab80 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -3620,7 +3620,7 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx, break; } - down_write(&fs_info->dev_replace.rwsem); + down_write(&dev_replace->rwsem); dev_replace->cursor_right = found_key.offset + length; dev_replace->cursor_left = found_key.offset; dev_replace->item_needs_writeback = 1; @@ -3661,10 +3661,10 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx, scrub_pause_off(fs_info); - down_write(&fs_info->dev_replace.rwsem); + down_write(&dev_replace->rwsem); dev_replace->cursor_left = dev_replace->cursor_right; dev_replace->item_needs_writeback = 1; - up_write(&fs_info->dev_replace.rwsem); + up_write(&dev_replace->rwsem); if (ro_set) btrfs_dec_block_group_ro(cache); |