[Yaffs-archive] yaffs and 2.6.0-test2 kernel

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Nick Bane
Date:  
To: yaffs list
CC: Charles Manning
Subject: [Yaffs-archive] yaffs and 2.6.0-test2 kernel
Yaffsers

I have found and fixed the rename problem in linux kernel 2.6.0 and almost
certainly the 2.5 kernel one too (though I haven't tested it) and looks like
a sensible change for 2.4 as well.

The problem was that the dcache hash table in the new dentry was not being
created..

Close inspection of the vfs_rename function under yaffs shows that the
new_dentry being passed the the fs rename function has no hash table if it
is a new entry as opposed to pointing to an existing one that is to be
deleted. This caused a segfault in dcache's d_move when it tried to add a
NULL hash list to the existing hash list.

This is a result of the yaffs lookup function not d_add-ing the dentry when
no yaffs object is found during yaffs_lookup (and hence no inode).
Initialising inode to NULL and forcing a d_add call fixes this by creating
the dentry hash that was missing. I wonder if this might have been partly
responsible for other directory problems that have been seen.

I have had no time to make a pretty patch with kernel version testing but a
working source tree for 2.6.0-test2-rmk1-tcl1 can be found via the server
called "husaberg" that is refered to by ip address on www.toby-churchill.org
(I note that www.balloonboard.org is down right now).

Nick

-------------------------------------------
Nick Bane
Cambridge, UK.
+44(0)1954 719270




---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by
sending an email to with the text "unsubscribe"
(without the quotes) as the subject.