aboutsummaryrefslogtreecommitdiff
path: root/block/file-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/file-posix.c')
-rw-r--r--block/file-posix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/file-posix.c b/block/file-posix.c
index 829ee538d8..b57c58e80f 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -2112,7 +2112,7 @@ raw_co_create(BlockdevCreateOptions *options, Error **errp)
{
BlockdevCreateOptionsFile *file_opts;
int fd;
- int perm, shared;
+ uint64_t perm, shared;
int result = 0;
/* Validate options and set default values */
@@ -2148,7 +2148,7 @@ raw_co_create(BlockdevCreateOptions *options, Error **errp)
shared = BLK_PERM_ALL & ~BLK_PERM_RESIZE;
/* Step one: Take locks */
- result = raw_apply_lock_bytes(fd, perm, shared, false, errp);
+ result = raw_apply_lock_bytes(fd, perm, ~shared, false, errp);
if (result < 0) {
goto out_close;
}