Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230648
b: refs/heads/master
c: defad61
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown committed Jan 13, 2011
1 parent 6f5506c commit d42a253
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 43c73ca43b3e03bb228ff9350b6b44d0e560f262
refs/heads/master: defad61a5b16352d3e22a04d4c930a5b5a7fd1f0
13 changes: 10 additions & 3 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -4704,7 +4704,7 @@ static void md_clean(mddev_t *mddev)
mddev->plug = NULL;
}

void md_stop_writes(mddev_t *mddev)
static void __md_stop_writes(mddev_t *mddev)
{
if (mddev->sync_thread) {
set_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
Expand All @@ -4724,6 +4724,13 @@ void md_stop_writes(mddev_t *mddev)
md_update_sb(mddev, 1);
}
}

void md_stop_writes(mddev_t *mddev)
{
mddev_lock(mddev);
__md_stop_writes(mddev);
mddev_unlock(mddev);
}
EXPORT_SYMBOL_GPL(md_stop_writes);

void md_stop(mddev_t *mddev)
Expand All @@ -4748,7 +4755,7 @@ static int md_set_readonly(mddev_t *mddev, int is_open)
goto out;
}
if (mddev->pers) {
md_stop_writes(mddev);
__md_stop_writes(mddev);

err = -ENXIO;
if (mddev->ro==1)
Expand Down Expand Up @@ -4785,7 +4792,7 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
if (mddev->ro)
set_disk_ro(disk, 0);

md_stop_writes(mddev);
__md_stop_writes(mddev);
md_stop(mddev);
mddev->queue->merge_bvec_fn = NULL;
mddev->queue->unplug_fn = NULL;
Expand Down

0 comments on commit d42a253

Please sign in to comment.