mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
fuse: add need_resched() before unlocking bucket
In fuse_dentry_tree_work() no need to unlock/lock dentry_hash[i].lock on each iteration. Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Link: https://patch.msgid.link/20260114145344.468856-4-mszeredi@redhat.com Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
1e2c1af1be
commit
09f7a43ae5
|
|
@ -177,9 +177,11 @@ static void fuse_dentry_tree_work(struct work_struct *work)
|
|||
fd->dentry->d_flags |= DCACHE_OP_DELETE;
|
||||
spin_unlock(&fd->dentry->d_lock);
|
||||
d_dispose_if_unused(fd->dentry, &dispose);
|
||||
spin_unlock(&dentry_hash[i].lock);
|
||||
cond_resched();
|
||||
spin_lock(&dentry_hash[i].lock);
|
||||
if (need_resched()) {
|
||||
spin_unlock(&dentry_hash[i].lock);
|
||||
cond_resched();
|
||||
spin_lock(&dentry_hash[i].lock);
|
||||
}
|
||||
} else
|
||||
break;
|
||||
node = rb_first(&dentry_hash[i].tree);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user