Although some risk factors are out of your control, there are diet and lifestyle changes you can make to prevent gallstone attacks.