diff options
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 4c0b7569ba52..f3fd7e2cbc38 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/ctype.h> | 37 | #include <linux/ctype.h> |
38 | #include <linux/namei.h> | 38 | #include <linux/namei.h> |
39 | #include <linux/miscdevice.h> | 39 | #include <linux/miscdevice.h> |
40 | #include <linux/magic.h> | ||
40 | #include "compat.h" | 41 | #include "compat.h" |
41 | #include "ctree.h" | 42 | #include "ctree.h" |
42 | #include "disk-io.h" | 43 | #include "disk-io.h" |
@@ -50,7 +51,6 @@ | |||
50 | #include "export.h" | 51 | #include "export.h" |
51 | #include "compression.h" | 52 | #include "compression.h" |
52 | 53 | ||
53 | #define BTRFS_SUPER_MAGIC 0x9123683E | ||
54 | 54 | ||
55 | static struct super_operations btrfs_super_ops; | 55 | static struct super_operations btrfs_super_ops; |
56 | 56 | ||
@@ -606,18 +606,20 @@ out: | |||
606 | return ret; | 606 | return ret; |
607 | } | 607 | } |
608 | 608 | ||
609 | static void btrfs_write_super_lockfs(struct super_block *sb) | 609 | static int btrfs_freeze(struct super_block *sb) |
610 | { | 610 | { |
611 | struct btrfs_root *root = btrfs_sb(sb); | 611 | struct btrfs_root *root = btrfs_sb(sb); |
612 | mutex_lock(&root->fs_info->transaction_kthread_mutex); | 612 | mutex_lock(&root->fs_info->transaction_kthread_mutex); |
613 | mutex_lock(&root->fs_info->cleaner_mutex); | 613 | mutex_lock(&root->fs_info->cleaner_mutex); |
614 | return 0; | ||
614 | } | 615 | } |
615 | 616 | ||
616 | static void btrfs_unlockfs(struct super_block *sb) | 617 | static int btrfs_unfreeze(struct super_block *sb) |
617 | { | 618 | { |
618 | struct btrfs_root *root = btrfs_sb(sb); | 619 | struct btrfs_root *root = btrfs_sb(sb); |
619 | mutex_unlock(&root->fs_info->cleaner_mutex); | 620 | mutex_unlock(&root->fs_info->cleaner_mutex); |
620 | mutex_unlock(&root->fs_info->transaction_kthread_mutex); | 621 | mutex_unlock(&root->fs_info->transaction_kthread_mutex); |
622 | return 0; | ||
621 | } | 623 | } |
622 | 624 | ||
623 | static struct super_operations btrfs_super_ops = { | 625 | static struct super_operations btrfs_super_ops = { |
@@ -632,8 +634,8 @@ static struct super_operations btrfs_super_ops = { | |||
632 | .destroy_inode = btrfs_destroy_inode, | 634 | .destroy_inode = btrfs_destroy_inode, |
633 | .statfs = btrfs_statfs, | 635 | .statfs = btrfs_statfs, |
634 | .remount_fs = btrfs_remount, | 636 | .remount_fs = btrfs_remount, |
635 | .write_super_lockfs = btrfs_write_super_lockfs, | 637 | .freeze_fs = btrfs_freeze, |
636 | .unlockfs = btrfs_unlockfs, | 638 | .unfreeze_fs = btrfs_unfreeze, |
637 | }; | 639 | }; |
638 | 640 | ||
639 | static const struct file_operations btrfs_ctl_fops = { | 641 | static const struct file_operations btrfs_ctl_fops = { |