Tools: hv: vssdaemon: skip all filesystems mounted readonly
authorVitaly Kuznetsov <vkuznets@redhat.com>
Mon, 10 Nov 2014 16:37:02 +0000 (17:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Nov 2014 03:01:11 +0000 (19:01 -0800)
Instead of making a list of exceptions for readonly filesystems
in addition to iso9660 we already have it is better to skip freeze
operation for all readonly-mounted filesystems.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Acked-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/hv/hv_vss_daemon.c

index ee44f0d730ef1a8ff42e19654f782c9d415158b7..5e63f70bd956e56f9506ef306e11ff2206c23b52 100644 (file)
@@ -102,7 +102,7 @@ static int vss_operate(int operation)
        while ((ent = getmntent(mounts))) {
                if (strncmp(ent->mnt_fsname, match, strlen(match)))
                        continue;
-               if (strcmp(ent->mnt_type, "iso9660") == 0)
+               if (hasmntopt(ent, MNTOPT_RO) != NULL)
                        continue;
                if (strcmp(ent->mnt_type, "vfat") == 0)
                        continue;