diff options
-rw-r--r-- | fs/dcache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index fd244c7a7cc0..eeafc14c2a14 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -1616,8 +1616,11 @@ static void switch_names(struct dentry *dentry, struct dentry *target) | |||
1616 | */ | 1616 | */ |
1617 | memcpy(dentry->d_iname, target->d_name.name, | 1617 | memcpy(dentry->d_iname, target->d_name.name, |
1618 | target->d_name.len + 1); | 1618 | target->d_name.len + 1); |
1619 | dentry->d_name.len = target->d_name.len; | ||
1620 | return; | ||
1619 | } | 1621 | } |
1620 | } | 1622 | } |
1623 | do_switch(dentry->d_name.len, target->d_name.len); | ||
1621 | } | 1624 | } |
1622 | 1625 | ||
1623 | /* | 1626 | /* |
@@ -1677,7 +1680,6 @@ already_unhashed: | |||
1677 | 1680 | ||
1678 | /* Switch the names.. */ | 1681 | /* Switch the names.. */ |
1679 | switch_names(dentry, target); | 1682 | switch_names(dentry, target); |
1680 | do_switch(dentry->d_name.len, target->d_name.len); | ||
1681 | do_switch(dentry->d_name.hash, target->d_name.hash); | 1683 | do_switch(dentry->d_name.hash, target->d_name.hash); |
1682 | 1684 | ||
1683 | /* ... and switch the parents */ | 1685 | /* ... and switch the parents */ |
@@ -1787,7 +1789,6 @@ static void __d_materialise_dentry(struct dentry *dentry, struct dentry *anon) | |||
1787 | struct dentry *dparent, *aparent; | 1789 | struct dentry *dparent, *aparent; |
1788 | 1790 | ||
1789 | switch_names(dentry, anon); | 1791 | switch_names(dentry, anon); |
1790 | do_switch(dentry->d_name.len, anon->d_name.len); | ||
1791 | do_switch(dentry->d_name.hash, anon->d_name.hash); | 1792 | do_switch(dentry->d_name.hash, anon->d_name.hash); |
1792 | 1793 | ||
1793 | dparent = dentry->d_parent; | 1794 | dparent = dentry->d_parent; |