summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorDenis V. Lunev via <qemu-block@nongnu.org>2024-04-30 19:02:13 +0200
committerKevin Wolf <kwolf@redhat.com>2024-06-10 11:05:43 +0200
commitb67e353863deec6b7fbbc728773180a8533e9e48 (patch)
treef21ce3890bf748d30c884dd1f258e20fa1ad1824 /block
parent80e8f0602168f451a93e71cbb1d59e93d745e62e (diff)
block: drop force_dup parameter of raw_reconfigure_getfd()
Since commit 72373e40fbc, this parameter is always passed as 'false' from the caller. Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com> CC: Kevin Wolf <kwolf@redhat.com> CC: Hanna Reitz <hreitz@redhat.com> Message-ID: <20240430170213.148558-1-den@openvz.org> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/file-posix.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/block/file-posix.c b/block/file-posix.c
index 35684f7e21..5c46938936 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1039,8 +1039,7 @@ static int fcntl_setfl(int fd, int flag)
}
static int raw_reconfigure_getfd(BlockDriverState *bs, int flags,
- int *open_flags, uint64_t perm, bool force_dup,
- Error **errp)
+ int *open_flags, uint64_t perm, Error **errp)
{
BDRVRawState *s = bs->opaque;
int fd = -1;
@@ -1068,7 +1067,7 @@ static int raw_reconfigure_getfd(BlockDriverState *bs, int flags,
assert((s->open_flags & O_ASYNC) == 0);
#endif
- if (!force_dup && *open_flags == s->open_flags) {
+ if (*open_flags == s->open_flags) {
/* We're lucky, the existing fd is fine */
return s->fd;
}
@@ -3748,8 +3747,7 @@ static int raw_check_perm(BlockDriverState *bs, uint64_t perm, uint64_t shared,
int ret;
/* We may need a new fd if auto-read-only switches the mode */
- ret = raw_reconfigure_getfd(bs, input_flags, &open_flags, perm,
- false, errp);
+ ret = raw_reconfigure_getfd(bs, input_flags, &open_flags, perm, errp);
if (ret < 0) {
return ret;
} else if (ret != s->fd) {