diff options
author | David Sterba <dsterba@suse.com> | 2019-05-02 16:53:47 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-07-02 12:30:47 +0200 |
commit | 00801ae4bb2be5f5af46502ef239ac5f4b536094 (patch) | |
tree | d9835c3f4d44ecc3c4aa15c3707c4aea1a243ee3 /fs/btrfs/extent_io.c | |
parent | f3dc24c52a28c700e35757dce7b38456888071e1 (diff) | |
download | lwn-00801ae4bb2be5f5af46502ef239ac5f4b536094.tar.gz lwn-00801ae4bb2be5f5af46502ef239ac5f4b536094.zip |
btrfs: switch extent_buffer write_locks from atomic to int
The write_locks is either 0 or 1 and always updated under the lock,
so we don't need the atomic_t semantics.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index fef346c63203..464e6b761a9c 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -4879,7 +4879,7 @@ __alloc_extent_buffer(struct btrfs_fs_info *fs_info, u64 start, eb->spinning_writers = 0; atomic_set(&eb->spinning_readers, 0); atomic_set(&eb->read_locks, 0); - atomic_set(&eb->write_locks, 0); + eb->write_locks = 0; #endif return eb; |