提交 986c0194 编写于 作者: A Al Viro

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: NAl Viro <viro@zeniv.linux.org.uk>
上级 63cf427a
...@@ -2442,13 +2442,14 @@ static void dentry_lock_for_move(struct dentry *dentry, struct dentry *target) ...@@ -2442,13 +2442,14 @@ static void dentry_lock_for_move(struct dentry *dentry, struct dentry *target)
} }
} }
static void dentry_unlock_parents_for_move(struct dentry *dentry, static void dentry_unlock_for_move(struct dentry *dentry, struct dentry *target)
struct dentry *target)
{ {
if (target->d_parent != dentry->d_parent) if (target->d_parent != dentry->d_parent)
spin_unlock(&dentry->d_parent->d_lock); spin_unlock(&dentry->d_parent->d_lock);
if (target->d_parent != target) if (target->d_parent != target)
spin_unlock(&target->d_parent->d_lock); spin_unlock(&target->d_parent->d_lock);
spin_unlock(&target->d_lock);
spin_unlock(&dentry->d_lock);
} }
/* /*
...@@ -2531,9 +2532,7 @@ static void __d_move(struct dentry *dentry, struct dentry *target, ...@@ -2531,9 +2532,7 @@ static void __d_move(struct dentry *dentry, struct dentry *target,
write_seqcount_end(&target->d_seq); write_seqcount_end(&target->d_seq);
write_seqcount_end(&dentry->d_seq); write_seqcount_end(&dentry->d_seq);
dentry_unlock_parents_for_move(dentry, target); dentry_unlock_for_move(dentry, target);
spin_unlock(&target->d_lock);
spin_unlock(&dentry->d_lock);
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册