Skip to content

Commit

Permalink
fold swapping ->d_name.hash into switch_names()
Browse files Browse the repository at this point in the history
and do it along with ->d_name.len there

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Linus Torvalds authored and Al Viro committed Sep 27, 2014
1 parent 986c019 commit a28ddb8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/dcache.c
Original file line number Diff line number Diff line change
@@ -2412,7 +2412,7 @@ static void switch_names(struct dentry *dentry, struct dentry *target)
}
}
}
swap(dentry->d_name.len, target->d_name.len);
swap(dentry->d_name.hash_len, target->d_name.hash_len);
}

static void dentry_lock_for_move(struct dentry *dentry, struct dentry *target)
@@ -2510,7 +2510,6 @@ static void __d_move(struct dentry *dentry, struct dentry *target,

/* Switch the names.. */
switch_names(dentry, target);
swap(dentry->d_name.hash, target->d_name.hash);

/* ... and switch them in the tree */
if (IS_ROOT(dentry)) {

0 comments on commit a28ddb8

Please sign in to comment.