[Yaffs] Some problem of yaffs_delete_inode , causee page fau…

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: fs p
Date:  
To: yaffs
CC: Charles Manning
Subject: [Yaffs] Some problem of yaffs_delete_inode , causee page fault
My kenel is 2.6.19 , yaffs is 09-2-24 from cvs

If I delete a dir named "oop ", use rmdir cmd , found that:

1. yaffs_DoGenericObjectDeletion is called (frist time) ,
                   the oop  is move to yaffs's deletedDir,  now oop's parnet
is deletedDir , then yaffs_RemoveObjectFromDirectory ( yaffs_gus.c :5201 )is
called ,  so the  oop 's parnet is NULL;  (


2. Then in the do_rmdir function, after the vfs_rmdir , will call :

dput ----->yaffs_delete_inode( from inode get the yaffs_object , but the
obj's parnet is NULL )
--->yaffs_DeleteFile--->yaffs_DoGenericObjectDeletion( second time) , from
here yaffs complain:

==>> yaffs bug: fs/yaffs2/yaffs_guts.c 6836
==>> yaffs bug: fs/yaffs2/yaffs_guts.c 6763

The problem is    oop->parent=NULL , so run in   yaffs_VerifyDirectory ,
page fault come.


Any Tips? I want change the yaffs_delete_inode like this:

yaffs_Object *obj = yaffs_InodeToObject(inode);

    if( obj && obj->parent){
    dev = obj->myDev;
        yaffs_GrossLock(dev);
        yaffs_DeleteFile(obj);
        yaffs_GrossUnlock(dev);


}