Commit 0176260f authored by Linus Torvalds's avatar Linus Torvalds

btrfs: fix for write_super_lockfs/unlockfs error handling

Commit c4be0c1d added the ability for
write_super_lockfs to return errors, and renamed them to match.  But
btrfs didn't get converted.

Do the minimal conversion to make it compile again.
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f4b477c4
...@@ -605,18 +605,20 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd, ...@@ -605,18 +605,20 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
return ret; return ret;
} }
static void btrfs_write_super_lockfs(struct super_block *sb) static int btrfs_freeze(struct super_block *sb)
{ {
struct btrfs_root *root = btrfs_sb(sb); struct btrfs_root *root = btrfs_sb(sb);
mutex_lock(&root->fs_info->transaction_kthread_mutex); mutex_lock(&root->fs_info->transaction_kthread_mutex);
mutex_lock(&root->fs_info->cleaner_mutex); mutex_lock(&root->fs_info->cleaner_mutex);
return 0;
} }
static void btrfs_unlockfs(struct super_block *sb) static int btrfs_unfreeze(struct super_block *sb)
{ {
struct btrfs_root *root = btrfs_sb(sb); struct btrfs_root *root = btrfs_sb(sb);
mutex_unlock(&root->fs_info->cleaner_mutex); mutex_unlock(&root->fs_info->cleaner_mutex);
mutex_unlock(&root->fs_info->transaction_kthread_mutex); mutex_unlock(&root->fs_info->transaction_kthread_mutex);
return 0;
} }
static struct super_operations btrfs_super_ops = { static struct super_operations btrfs_super_ops = {
...@@ -631,8 +633,8 @@ static struct super_operations btrfs_super_ops = { ...@@ -631,8 +633,8 @@ static struct super_operations btrfs_super_ops = {
.destroy_inode = btrfs_destroy_inode, .destroy_inode = btrfs_destroy_inode,
.statfs = btrfs_statfs, .statfs = btrfs_statfs,
.remount_fs = btrfs_remount, .remount_fs = btrfs_remount,
.write_super_lockfs = btrfs_write_super_lockfs, .freeze_fs = btrfs_freeze,
.unlockfs = btrfs_unlockfs, .unfreeze_fs = btrfs_unfreeze,
}; };
static const struct file_operations btrfs_ctl_fops = { static const struct file_operations btrfs_ctl_fops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment