umount: always use umount2 syscall with specified flags
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 1 Oct 2015 16:50:06 +0000 (18:50 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 1 Oct 2015 16:50:06 +0000 (18:50 +0200)
commitc919d561adaf152d9b8834475539e2366c8aa484
treed01d9fbb3ee8523f47c4b18c409f42ef1537cbf8
parentc65a7596df190124abd72d33e2c8c3d2bc8bff80
umount: always use umount2 syscall with specified flags

Make umount -f more compatible with util-linux 2.22.2.

Before:
  * 'umount -f': calls umount syscall,
        if it fails calls umount2 with 'MNT_FORCE'
  * 'mount -f -l': calls umount syscall,
        if it fails calls umount2 with 'MNT_LAZY'. 'MNT_FORCE' dropped
After:
  * 'umount -f': calls umount2 syscall with 'MNT_FORCE'
  * 'mount -f -l': calls umount2 syscall with 'MNT_LAZY' and 'MNT_FORCE'

function                                             old     new   delta
umount                                                45       -     -45
umount_main                                          610     555     -55

Signed-off-by: Anton Bondarenko <anton.bondarenko@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/umount.c