]> git.ipfire.org Git - thirdparty/mdadm.git/blob - kernel-patch-2.6.18
Don't close fds in write_init_super
[thirdparty/mdadm.git] / kernel-patch-2.6.18
1
2 ### Diffstat output
3 ./drivers/md/md.c | 6 +++++-
4 1 file changed, 5 insertions(+), 1 deletion(-)
5
6 diff .prev/drivers/md/md.c ./drivers/md/md.c
7 --- .prev/drivers/md/md.c 2006-10-23 10:26:37.000000000 +1000
8 +++ ./drivers/md/md.c 2006-12-21 16:28:29.000000000 +1100
9 @@ -1783,7 +1783,8 @@ state_store(mdk_rdev_t *rdev, const char
10 else {
11 mddev_t *mddev = rdev->mddev;
12 kick_rdev_from_array(rdev);
13 - md_update_sb(mddev);
14 + if (mddev->pers)
15 + md_update_sb(mddev);
16 md_new_event(mddev);
17 err = 0;
18 }
19 @@ -1994,6 +1995,8 @@ static mdk_rdev_t *md_import_device(dev_
20 kobject_init(&rdev->kobj);
21
22 rdev->desc_nr = -1;
23 + rdev->saved_raid_disk = -1;
24 + rdev->raid_disk = -1;
25 rdev->flags = 0;
26 rdev->data_offset = 0;
27 rdev->sb_events = 0;
28 @@ -3991,6 +3994,7 @@ static int set_array_info(mddev_t * mdde
29 mddev->major_version = info->major_version;
30 mddev->minor_version = info->minor_version;
31 mddev->patch_version = info->patch_version;
32 + mddev->persistent = ! info->not_persistent;
33 return 0;
34 }
35 mddev->major_version = MD_MAJOR_VERSION;