Inverse probability weighting for marginal structural models has been suggested as a strategy to estimate the direct effect of a treatment or exposure on an outcome in studies where the effect of mediator on outcome is subject to posttreatment confounding. This type of confounding, whereby confounders of the effect of mediator on outcome are themselves affected by the exposure, complicates mediation analyses and necessitates apt analysis strategies. In this article, we contrast the inverse probability weighting approach with the traditional path analysis approach to mediation analysis. We show that in a particular class of linear models, adjustment for posttreatment confounding can be realized via a fairly standard modification of the traditional path analysis approach. The resulting approach is simpler; by avoiding inverse probability weighting, it moreover results in direct effect estimators with smaller finite sample bias and greater precision. We further show that a particular variant of the G-estimation approach from the causal inference literature is equivalent with the path analysis approach in simple linear settings but is more generally applicable in settings with interactions and/or noncontinuous mediators and confounders. We conclude that the use of inverse probability weighting for marginal structural models to adjust for posttreatment confounding in mediation analysis is primarily indicated in nonlinear models for the outcome.