summaryrefslogtreecommitdiff
blob: 8b3fd7f37910e3ac29c6c833f90ea01ffa2d744b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff -urpN a/modules/linux/vmsync/sync.c b/modules/linux/vmsync/sync.c
--- a/modules/linux/vmsync/sync.c	2012-08-01 19:02:59.000000000 -0700
+++ b/modules/linux/vmsync/sync.c	2012-10-14 07:38:18.000000000 -0700
@@ -162,7 +162,11 @@ VmSyncThawDevices(void  *_state)  // IN
    cancel_delayed_work(&state->thawTask);
    list_for_each_safe(cur, tmp, &state->devices) {
       dev = list_entry(cur, VmSyncBlockDevice, list);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
+      if (dev->sb != NULL && dev->sb->s_writers.frozen != SB_UNFROZEN) {
+#else
       if (dev->sb != NULL && dev->sb->s_frozen != SB_UNFROZEN) {
+#endif
          thaw_bdev(dev->bdev, dev->sb);
          atomic_dec(&gFreezeCount);
       }
@@ -237,7 +241,11 @@ VmSyncAddPath(const VmSyncState *state,
     * the superblock is already frozen.
     */
    if (inode->i_sb->s_bdev == NULL ||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
+       inode->i_sb->s_writers.frozen != SB_UNFROZEN) {
+#else
        inode->i_sb->s_frozen != SB_UNFROZEN) {
+#endif
       result = (inode->i_sb->s_bdev == NULL) ? -EINVAL : -EALREADY;
       compat_path_release(&nd);
       goto exit;