Skip to content

Commit 986c019

Browse files
author
Al Viro
committed
fold unlocking the children into dentry_unlock_parents_for_move()
... renaming it into dentry_unlock_for_move() and making it more symmetric with dentry_lock_for_move(). Signed-off-by: Al Viro <[email protected]>
1 parent 63cf427 commit 986c019

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

fs/dcache.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2442,13 +2442,14 @@ static void dentry_lock_for_move(struct dentry *dentry, struct dentry *target)
24422442
}
24432443
}
24442444

2445-
static void dentry_unlock_parents_for_move(struct dentry *dentry,
2446-
struct dentry *target)
2445+
static void dentry_unlock_for_move(struct dentry *dentry, struct dentry *target)
24472446
{
24482447
if (target->d_parent != dentry->d_parent)
24492448
spin_unlock(&dentry->d_parent->d_lock);
24502449
if (target->d_parent != target)
24512450
spin_unlock(&target->d_parent->d_lock);
2451+
spin_unlock(&target->d_lock);
2452+
spin_unlock(&dentry->d_lock);
24522453
}
24532454

24542455
/*
@@ -2531,9 +2532,7 @@ static void __d_move(struct dentry *dentry, struct dentry *target,
25312532
write_seqcount_end(&target->d_seq);
25322533
write_seqcount_end(&dentry->d_seq);
25332534

2534-
dentry_unlock_parents_for_move(dentry, target);
2535-
spin_unlock(&target->d_lock);
2536-
spin_unlock(&dentry->d_lock);
2535+
dentry_unlock_for_move(dentry, target);
25372536
}
25382537

25392538
/*

0 commit comments

Comments
 (0)