To prevent this from occurring, avoid putting the computer to sleep while SMB shared disks are mounted, especially when using an SMB-based home directory. The computer will not go to sleep automatically while SMB shared disks are mounted, but it can still be put to sleep manually (from the Apple menu or by closing the display on a portable computer).
Warning: You may lose unsaved changes to documents stored on the shared disk when your computer goes to sleep. Either always save your work or do not put the computer to sleep to prevent this from happening.