src/t_mtab: Add error check for unlock_mtab()
authorCui Yue <cuiyue-fnst@cn.fujitsu.com>
Tue, 12 Feb 2019 11:12:30 +0000 (19:12 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sat, 16 Feb 2019 10:10:33 +0000 (18:10 +0800)
commit0177f3c4588313954ff21ea0017d607a23286e1c
treea0caf3b673804d5054e5bfa7940718dc998c1639
parenta70fb7335cc41e4100b34b162a022e341d34b8ca
src/t_mtab: Add error check for unlock_mtab()

When unlink() fails, that is, when the lock file is not deleted
successfully, variable we_created_lockfile is still set to 0.

On the next iteration, the 3 processes will not be able to
successfully create the lock file.

Signed-off-by: Cui Yue <cuiyue-fnst@cn.fujitsu.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/t_mtab.c