mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-07 11:10:44 +00:00
Only shutdown locks that were setup
Lock shutdown was crashing trying to deref a null linf on cleanup from mont errors that happened before locks were setup. Make sure lock shutdown only tries to do work if the locks have been setup. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -336,11 +336,14 @@ void scoutfs_lock_shutdown(struct super_block *sb)
|
||||
DECLARE_LOCK_INFO(sb, linf);
|
||||
struct held_locks *held = linf->held;
|
||||
|
||||
spin_lock(&held->lock);
|
||||
linf->shutdown = true;
|
||||
spin_unlock(&held->lock);
|
||||
if (linf) {
|
||||
held = linf->held;
|
||||
spin_lock(&held->lock);
|
||||
linf->shutdown = true;
|
||||
spin_unlock(&held->lock);
|
||||
|
||||
wake_up(&held->waitq);
|
||||
wake_up(&held->waitq);
|
||||
}
|
||||
}
|
||||
|
||||
void scoutfs_lock_destroy(struct super_block *sb)
|
||||
|
||||
Reference in New Issue
Block a user