[Yaffs] delete inode on 2.6.14
Michael Trimarchi
trimarchi at gandalf.sssup.it
Mon Mar 6 13:42:25 GMT 2006
Hi all,
I think the yaffs_delete_inode on yaffs must be correct on new kernel.
static void yaffs_delete_inode(struct inode *inode)
{
yaffs_Object *obj = yaffs_InodeToObject(inode);
yaffs_Device *dev;
T(YAFFS_TRACE_OS,("yaffs_delete_inode: ino %d, count %d
%s\n",(int)inode->i_ino, atomic_read(&inode->i_count),
obj ? "object exists" : "null object"));
if(obj)
{
dev = obj->myDev;
yaffs_GrossLock(dev);
yaffs_DeleteFile(obj);
yaffs_GrossUnlock(dev);
}
clear_inode(inode);
}
The new one:
static void yaffs_delete_inode(struct inode *inode)
{
yaffs_Object *obj = yaffs_InodeToObject(inode);
yaffs_Device *dev;
if (inode->i_data.nrpages)
truncate_inode_pages(&inode->i_data, 0);
T(YAFFS_TRACE_OS,("yaffs_delete_inode: ino %d, count %d
%s\n",(int)inode->i_ino, atomic_read(&inode->i_count),
obj ? "object exists" : "null object"));
if(obj)
{
dev = obj->myDev;
yaffs_GrossLock(dev);
yaffs_DeleteFile(obj);
yaffs_GrossUnlock(dev);
}
clear_inode(inode);
}
Is it correct?
Regards Michael
More information about the yaffs
mailing list