/* yaffs_put_handle Let go of a handle when closing a file or aborting an open or ending a read or write.  */
static int yaffsfs_PutFileDes(int fdId)
/* yaffs_put_handle Let go of a handle when closing a file or aborting an open or ending a read or write.  */
static int yaffsfs_PutFileDes(int fdId)
{
	struct yaffsfs_FileDes *fd;
	if (fdId >= 0 && fdId < YAFFSFS_N_HANDLES) {
		fd = &yaffsfs_fd[fdId];
		fd->handleCount--;
		if (fd->handleCount < 1) {
			if (fd->inodeId >= 0) {
				yaffsfs_PutInode(fd->inodeId);
				fd->inodeId = -1;
			}
		}
	}
	return 0;
}