The critical current
I
c
of single crystals of the iron pnictide superconductor BaFe2(As
1
−
x
P
x
)2 has been studied through measurements of magnetic hysteresis cycles. We show that the introduction of micrometer-scale irregularities on the surface significantly increases
I
c
, primarily near the irreversibility magnetic field
H
irr
. The observed increase can be attributed to a non-dissipative surface current that arises from the collective bending of the vortex lattice at the sample surface, enabled by the surface irregularities. This mechanism, which is not pinning in the proper sense, has previously been studied in clean, low-
T
c
, metallic superconductors, but had not been investigated in Fe-based superconductors. The observed increase in
I
c
is consistent with a theoretical estimate based on the Mathieu-Simon continuum theory of the vortex state.