* [PATCH] Btrfs: remove unused wait in btrfs_stripe_hash
@ 2017-12-22 23:23 Liu Bo
2018-01-02 16:29 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Liu Bo @ 2017-12-22 23:23 UTC (permalink / raw)
To: linux-btrfs
In fact nobody is waiting on @wait's waitqueue, it can be safely
removed.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
fs/btrfs/ctree.h | 1 -
fs/btrfs/raid56.c | 10 ----------
2 files changed, 11 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 13c260b..b2e09fe 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -679,7 +679,6 @@ enum btrfs_orphan_cleanup_state {
/* used by the raid56 code to lock stripes for read/modify/write */
struct btrfs_stripe_hash {
struct list_head hash_list;
- wait_queue_head_t wait;
spinlock_t lock;
};
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 3940906..9fa45e0 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -231,7 +231,6 @@ int btrfs_alloc_stripe_hash_table(struct btrfs_fs_info *info)
cur = h + i;
INIT_LIST_HEAD(&cur->hash_list);
spin_lock_init(&cur->lock);
- init_waitqueue_head(&cur->wait);
}
x = cmpxchg(&info->stripe_hash_table, NULL, table);
@@ -815,15 +814,6 @@ static noinline void unlock_stripe(struct btrfs_raid_bio *rbio)
}
goto done_nolock;
- /*
- * The barrier for this waitqueue_active is not needed,
- * we're protected by h->lock and can't miss a wakeup.
- */
- } else if (waitqueue_active(&h->wait)) {
- spin_unlock(&rbio->bio_list_lock);
- spin_unlock_irqrestore(&h->lock, flags);
- wake_up(&h->wait);
- goto done_nolock;
}
}
done:
--
2.9.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Btrfs: remove unused wait in btrfs_stripe_hash
2017-12-22 23:23 [PATCH] Btrfs: remove unused wait in btrfs_stripe_hash Liu Bo
@ 2018-01-02 16:29 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2018-01-02 16:29 UTC (permalink / raw)
To: Liu Bo; +Cc: linux-btrfs
On Fri, Dec 22, 2017 at 04:23:01PM -0700, Liu Bo wrote:
> In fact nobody is waiting on @wait's waitqueue, it can be safely
> removed.
>
> Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-02 16:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-22 23:23 [PATCH] Btrfs: remove unused wait in btrfs_stripe_hash Liu Bo
2018-01-02 16:29 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).