block/file-posix: Pass FD to locking helpers
commitd0a96155de099d388f5e1f46277a54bdcfbb0bb2
authorMax Reitz <mreitz@redhat.com>
Wed, 9 May 2018 21:53:34 +0000 (9 23:53 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 11 Jun 2018 14:18:45 +0000 (11 16:18 +0200)
tree9d2be013663946318915959ceba0c8e427c7870e
parent9f55925b8f50a962d1d08d815044db7767ae3838
block/file-posix: Pass FD to locking helpers

raw_apply_lock_bytes() and raw_check_lock_bytes() currently take a
BDRVRawState *, but they only use the lock_fd field.  During image
creation, we do not have a BDRVRawState, but we do have an FD; so if we
want to reuse the functions there, we should modify them to receive only
the FD.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 20180509215336.31304-2-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/file-posix.c