[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem when creating file in directory being deleted
> I've come across a problem when creating a file in a directory, when
> that directory is being deleted by another process. The file gets
> created, but is then orphaned; when remounting the filesystem later,
> the mount fails, complaining that it found an inode with no parent and
> pino set to some value.
Fun. Isn't the VFS supposed to protect us from this? The code in
jffs_remove() is OK. In jffs_create(), after grabbing the biglock, make it
check that the parent inode isn't already marked as deleted. Other inode
creation paths (mknod, mkdir etc) may need this too.
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to email@example.com