diff options
Diffstat (limited to 'drivers/md/dm-ioctl.c')
-rw-r--r-- | drivers/md/dm-ioctl.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 4510ad8f971c..cd6a184536a1 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -765,7 +765,7 @@ out: | |||
765 | static int do_suspend(struct dm_ioctl *param) | 765 | static int do_suspend(struct dm_ioctl *param) |
766 | { | 766 | { |
767 | int r = 0; | 767 | int r = 0; |
768 | int do_lockfs = 1; | 768 | unsigned suspend_flags = DM_SUSPEND_LOCKFS_FLAG; |
769 | struct mapped_device *md; | 769 | struct mapped_device *md; |
770 | 770 | ||
771 | md = find_device(param); | 771 | md = find_device(param); |
@@ -773,10 +773,12 @@ static int do_suspend(struct dm_ioctl *param) | |||
773 | return -ENXIO; | 773 | return -ENXIO; |
774 | 774 | ||
775 | if (param->flags & DM_SKIP_LOCKFS_FLAG) | 775 | if (param->flags & DM_SKIP_LOCKFS_FLAG) |
776 | do_lockfs = 0; | 776 | suspend_flags &= ~DM_SUSPEND_LOCKFS_FLAG; |
777 | if (param->flags & DM_NOFLUSH_FLAG) | ||
778 | suspend_flags |= DM_SUSPEND_NOFLUSH_FLAG; | ||
777 | 779 | ||
778 | if (!dm_suspended(md)) | 780 | if (!dm_suspended(md)) |
779 | r = dm_suspend(md, do_lockfs); | 781 | r = dm_suspend(md, suspend_flags); |
780 | 782 | ||
781 | if (!r) | 783 | if (!r) |
782 | r = __dev_status(md, param); | 784 | r = __dev_status(md, param); |
@@ -788,7 +790,7 @@ static int do_suspend(struct dm_ioctl *param) | |||
788 | static int do_resume(struct dm_ioctl *param) | 790 | static int do_resume(struct dm_ioctl *param) |
789 | { | 791 | { |
790 | int r = 0; | 792 | int r = 0; |
791 | int do_lockfs = 1; | 793 | unsigned suspend_flags = DM_SUSPEND_LOCKFS_FLAG; |
792 | struct hash_cell *hc; | 794 | struct hash_cell *hc; |
793 | struct mapped_device *md; | 795 | struct mapped_device *md; |
794 | struct dm_table *new_map; | 796 | struct dm_table *new_map; |
@@ -814,9 +816,11 @@ static int do_resume(struct dm_ioctl *param) | |||
814 | if (new_map) { | 816 | if (new_map) { |
815 | /* Suspend if it isn't already suspended */ | 817 | /* Suspend if it isn't already suspended */ |
816 | if (param->flags & DM_SKIP_LOCKFS_FLAG) | 818 | if (param->flags & DM_SKIP_LOCKFS_FLAG) |
817 | do_lockfs = 0; | 819 | suspend_flags &= ~DM_SUSPEND_LOCKFS_FLAG; |
820 | if (param->flags & DM_NOFLUSH_FLAG) | ||
821 | suspend_flags |= DM_SUSPEND_NOFLUSH_FLAG; | ||
818 | if (!dm_suspended(md)) | 822 | if (!dm_suspended(md)) |
819 | dm_suspend(md, do_lockfs); | 823 | dm_suspend(md, suspend_flags); |
820 | 824 | ||
821 | r = dm_swap_table(md, new_map); | 825 | r = dm_swap_table(md, new_map); |
822 | if (r) { | 826 | if (r) { |