The depletion layer is formed by the movement of electrons from the n to p side and holes from p to n side of the diode. The layer consists of positively charged donor ions close to the n side and negatively charged acceptor ions close to the p side. When in equilibrium,the barrier potential prevents this flow of carriers and the current is 0. Now when we forward bias a diode, the external voltage is in the opposite direction of the barrier potential and hence decreases the barrier potential. As a result the movement of electrons from n to p dominates once again. But keeping in mind that this flow was responsible for the creation of the depletion layer in the first place, why is the width of the same decreasing? If electrons are going to move from n to p because of reduction of the barrier potential , shouldn't it just create more donor ions and acceptor ions on either side and hence increase the width? Please help me find the flaw in my understanding.