<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Roman Zippel &lt;zippel@linux-m68k.org&gt;

After a file has been renamed, the cached search key must be updated.

Signed-off-by: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
---

 25-akpm/fs/hfs/dir.c |    3 +++
 1 files changed, 3 insertions(+)

diff -puN fs/hfs/dir.c~hfs-update-key-after-rename fs/hfs/dir.c
--- 25/fs/hfs/dir.c~hfs-update-key-after-rename	Wed Oct 20 16:41:16 2004
+++ 25-akpm/fs/hfs/dir.c	Wed Oct 20 16:41:16 2004
@@ -306,6 +306,9 @@ int hfs_rename(struct inode *old_dir, st
 	res = hfs_cat_move(old_dentry-&gt;d_inode-&gt;i_ino,
 			   old_dir, &amp;old_dentry-&gt;d_name,
 			   new_dir, &amp;new_dentry-&gt;d_name);
+	if (!res)
+		hfs_cat_build_key((btree_key *)&amp;HFS_I(old_dentry-&gt;d_inode)-&gt;cat_key,
+				  new_dir-&gt;i_ino, &amp;new_dentry-&gt;d_name);
 	return res;
 }
 
_
</pre></body></html>