generic/484: Need another process to check record locks

According to fcntl(2) manpage, A single process always gets F_UNLCK
in the l_type field when using fcntl(F_GETLK) to acquire the
existing lock set by itself because it could convert the existing
lock to a new lock unconditionally.  So we need another process to
check if the lock exists.

Also remove redundant exit(0).

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Xiong Zhou <xzhou@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
1 file changed