Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359164
b: refs/heads/master
c: 740da42
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Feb 23, 2013
1 parent 36567b5 commit d08c377
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54c807e71d5ac59dee56c685f2b66e27cd54c475
refs/heads/master: 740da42efa24ac00dfb40d2f02d9d7f7a485049b
19 changes: 5 additions & 14 deletions trunk/fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2394,32 +2394,23 @@ static struct dentry *__d_unalias(struct inode *inode,
*/
static void __d_materialise_dentry(struct dentry *dentry, struct dentry *anon)
{
struct dentry *dparent, *aparent;
struct dentry *dparent;

dentry_lock_for_move(anon, dentry);

write_seqcount_begin(&dentry->d_seq);
write_seqcount_begin(&anon->d_seq);

dparent = dentry->d_parent;
aparent = anon->d_parent;

switch_names(dentry, anon);
swap(dentry->d_name.hash, anon->d_name.hash);

dentry->d_parent = (aparent == anon) ? dentry : aparent;
list_del(&dentry->d_u.d_child);
if (!IS_ROOT(dentry))
list_add(&dentry->d_u.d_child, &dentry->d_parent->d_subdirs);
else
INIT_LIST_HEAD(&dentry->d_u.d_child);

anon->d_parent = (dparent == dentry) ? anon : dparent;
dentry->d_parent = dentry;
list_del_init(&dentry->d_u.d_child);
anon->d_parent = dparent;
list_del(&anon->d_u.d_child);
if (!IS_ROOT(anon))
list_add(&anon->d_u.d_child, &anon->d_parent->d_subdirs);
else
INIT_LIST_HEAD(&anon->d_u.d_child);
list_add(&anon->d_u.d_child, &dparent->d_subdirs);

write_seqcount_end(&dentry->d_seq);
write_seqcount_end(&anon->d_seq);
Expand Down

0 comments on commit d08c377

Please sign in to comment.