Patchwork [3/3] Disable fall-back to read-only when cannot open drive's file for read-write

login
register
mail settings
Submitter Naphtali Sprei
Date Jan. 14, 2010, 2:33 p.m.
Message ID <4B4F2B36.8090501@redhat.com>
Download mbox | patch
Permalink /patch/42893/
State New
Headers show

Comments

Naphtali Sprei - Jan. 14, 2010, 2:33 p.m.
Signed-off-by: Naphtali Sprei <nsprei@redhat.com>
---
 block.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

Patch

diff --git a/block.c b/block.c
index cbd72cc..0b4b9ad 100644
--- a/block.c
+++ b/block.c
@@ -457,10 +457,6 @@  int bdrv_open2(BlockDriverState *bs, const char *filename, int flags,
         ret = -ENOTSUP;
     } else {
         ret = drv->bdrv_open(bs, filename, open_flags);
-        if ((ret == -EACCES || ret == -EPERM) && !(flags & BDRV_O_FILE)) {
-            ret = drv->bdrv_open(bs, filename, open_flags & ~BDRV_O_RDWR);
-            bs->read_only = 1;
-        }
     }
     if (ret < 0) {
         qemu_free(bs->opaque);