Unverified Commit 3926746b authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Christian Brauner
Browse files

fuse: clean up fuse_dentry_tree_work()



- Change time_after64() time_before64(), since the latter is exclusively
  used in this file to compare dentry/inode timeout with current time.

- Move the break statement from the else branch to the if branch, reducing
  indentation.

Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Link: https://patch.msgid.link/20260114145344.468856-5-mszeredi@redhat.com


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 09f7a43a
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -169,7 +169,9 @@ static void fuse_dentry_tree_work(struct work_struct *work)
		node = rb_first(&dentry_hash[i].tree);
		while (node) {
			fd = rb_entry(node, struct fuse_dentry, node);
			if (time_after64(get_jiffies_64(), fd->time)) {
			if (!time_before64(fd->time, get_jiffies_64()))
				break;

			rb_erase(&fd->node, &dentry_hash[i].tree);
			RB_CLEAR_NODE(&fd->node);
			spin_lock(&fd->dentry->d_lock);
@@ -182,8 +184,6 @@ static void fuse_dentry_tree_work(struct work_struct *work)
				cond_resched();
				spin_lock(&dentry_hash[i].lock);
			}
			} else
				break;
			node = rb_first(&dentry_hash[i].tree);
		}
		spin_unlock(&dentry_hash[i].lock);