btrfs: Remove unused readahead spinlock
authorMatthew Wilcox <mawilcox@microsoft.com>
Wed, 17 Jan 2018 20:21:49 +0000 (12:21 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:21 +0000 (16:08 +0100)
The reada_lock in struct btrfs_device was only initialised, and not
actually used.  That's good because there's another lock also called
reada_lock in the btrfs_fs_info that was quite heavily used.  Remove
this one.

Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c
fs/btrfs/volumes.h

index 11fccf2..5750cd9 100644 (file)
@@ -319,7 +319,6 @@ static struct btrfs_device *__alloc_device(void)
 
        spin_lock_init(&dev->io_lock);
 
-       spin_lock_init(&dev->reada_lock);
        atomic_set(&dev->reada_in_flight, 0);
        atomic_set(&dev->dev_stats_ccnt, 0);
        btrfs_device_data_ordered_init(dev);
index 15216fe..28c28ee 100644 (file)
@@ -137,7 +137,6 @@ struct btrfs_device {
        struct rcu_head rcu;
 
        /* readahead state */
-       spinlock_t reada_lock;
        atomic_t reada_in_flight;
        u64 reada_next;
        struct reada_zone *reada_curr_zone;