diff options
author | Christian Brauner <[email protected]> | 2022-04-20 15:19:25 +0200 |
---|---|---|
committer | Christian Brauner (Microsoft) <[email protected]> | 2022-04-21 17:57:37 +0200 |
commit | 0014edaedfd804dbf35b009808789325ca615716 (patch) | |
tree | bf07760ffe166cfeaacbbd45281f51242af3d796 /lib/mpi/mpi-cmp.c | |
parent | b2d229d4ddb17db541098b83524d901257e93845 (diff) |
fs: unset MNT_WRITE_HOLD on failure
After mnt_hold_writers() has been called we will always have set MNT_WRITE_HOLD
and consequently we always need to pair mnt_hold_writers() with
mnt_unhold_writers(). After the recent cleanup in [1] where Al switched from a
do-while to a for loop the cleanup currently fails to unset MNT_WRITE_HOLD for
the first mount that was changed. Fix this and make sure that the first mount
will be cleaned up and add some comments to make it more obvious.
Link: https://lore.kernel.org/lkml/[email protected]
Link: https://lore.kernel.org/lkml/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Fixes: e257039f0fc7 ("mount_setattr(): clean the control flow and calling conventions") [1]
Cc: Hillf Danton <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Al Viro <[email protected]>
Reported-by: [email protected]
Reported-by: [email protected]
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Christian Brauner (Microsoft) <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions