Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a28ddb87 authored by Linus Torvalds's avatar Linus Torvalds Committed by Al Viro
Browse files

fold swapping ->d_name.hash into switch_names()



and do it along with ->d_name.len there

Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 986c0194
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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)) {