diff options
author | NeilBrown <neilb@suse.de> | 2010-05-21 18:31:36 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-05-21 18:31:36 -0400 |
commit | 19fdb9eefb21b72edbc365b838502780c392bad6 (patch) | |
tree | deae04c48532d6eab64ed4b0396737bb854b5506 /drivers/md/md.c | |
parent | be6800a73aa2f3dc14744c3b80e676d189789f04 (diff) | |
parent | 3ff195b011d7decf501a4d55aeed312731094796 (diff) |
Merge commit '3ff195b011d7decf501a4d55aeed312731094796' into for-linus
Conflicts:
drivers/md/md.c
- Resolved conflict in md_update_sb
- Added extra 'NULL' arg to new instance of sysfs_get_dirent.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 26b3d2879d93..46b3a044eadf 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/delay.h> | 49 | #include <linux/delay.h> |
50 | #include <linux/raid/md_p.h> | 50 | #include <linux/raid/md_p.h> |
51 | #include <linux/raid/md_u.h> | 51 | #include <linux/raid/md_u.h> |
52 | #include <linux/slab.h> | ||
52 | #include "md.h" | 53 | #include "md.h" |
53 | #include "bitmap.h" | 54 | #include "bitmap.h" |
54 | 55 | ||
@@ -1814,7 +1815,7 @@ static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev) | |||
1814 | kobject_del(&rdev->kobj); | 1815 | kobject_del(&rdev->kobj); |
1815 | goto fail; | 1816 | goto fail; |
1816 | } | 1817 | } |
1817 | rdev->sysfs_state = sysfs_get_dirent(rdev->kobj.sd, "state"); | 1818 | rdev->sysfs_state = sysfs_get_dirent(rdev->kobj.sd, NULL, "state"); |
1818 | 1819 | ||
1819 | list_add_rcu(&rdev->same_set, &mddev->disks); | 1820 | list_add_rcu(&rdev->same_set, &mddev->disks); |
1820 | bd_claim_by_disk(rdev->bdev, rdev->bdev->bd_holder, mddev->gendisk); | 1821 | bd_claim_by_disk(rdev->bdev, rdev->bdev->bd_holder, mddev->gendisk); |
@@ -2683,7 +2684,7 @@ static void rdev_free(struct kobject *ko) | |||
2683 | mdk_rdev_t *rdev = container_of(ko, mdk_rdev_t, kobj); | 2684 | mdk_rdev_t *rdev = container_of(ko, mdk_rdev_t, kobj); |
2684 | kfree(rdev); | 2685 | kfree(rdev); |
2685 | } | 2686 | } |
2686 | static struct sysfs_ops rdev_sysfs_ops = { | 2687 | static const struct sysfs_ops rdev_sysfs_ops = { |
2687 | .show = rdev_attr_show, | 2688 | .show = rdev_attr_show, |
2688 | .store = rdev_attr_store, | 2689 | .store = rdev_attr_store, |
2689 | }; | 2690 | }; |
@@ -3027,7 +3028,7 @@ level_store(mddev_t *mddev, const char *buf, size_t len) | |||
3027 | printk(KERN_WARNING | 3028 | printk(KERN_WARNING |
3028 | "md: cannot register extra attributes for %s\n", | 3029 | "md: cannot register extra attributes for %s\n", |
3029 | mdname(mddev)); | 3030 | mdname(mddev)); |
3030 | mddev->sysfs_action = sysfs_get_dirent(mddev->kobj.sd, "sync_action"); | 3031 | mddev->sysfs_action = sysfs_get_dirent(mddev->kobj.sd, NULL, "sync_action"); |
3031 | } | 3032 | } |
3032 | if (mddev->pers->sync_request != NULL && | 3033 | if (mddev->pers->sync_request != NULL && |
3033 | pers->sync_request == NULL) { | 3034 | pers->sync_request == NULL) { |
@@ -4146,7 +4147,7 @@ static void md_free(struct kobject *ko) | |||
4146 | kfree(mddev); | 4147 | kfree(mddev); |
4147 | } | 4148 | } |
4148 | 4149 | ||
4149 | static struct sysfs_ops md_sysfs_ops = { | 4150 | static const struct sysfs_ops md_sysfs_ops = { |
4150 | .show = md_attr_show, | 4151 | .show = md_attr_show, |
4151 | .store = md_attr_store, | 4152 | .store = md_attr_store, |
4152 | }; | 4153 | }; |
@@ -4260,7 +4261,7 @@ static int md_alloc(dev_t dev, char *name) | |||
4260 | mutex_unlock(&disks_mutex); | 4261 | mutex_unlock(&disks_mutex); |
4261 | if (!error) { | 4262 | if (!error) { |
4262 | kobject_uevent(&mddev->kobj, KOBJ_ADD); | 4263 | kobject_uevent(&mddev->kobj, KOBJ_ADD); |
4263 | mddev->sysfs_state = sysfs_get_dirent(mddev->kobj.sd, "array_state"); | 4264 | mddev->sysfs_state = sysfs_get_dirent(mddev->kobj.sd, NULL, "array_state"); |
4264 | } | 4265 | } |
4265 | mddev_put(mddev); | 4266 | mddev_put(mddev); |
4266 | return error; | 4267 | return error; |
@@ -4473,7 +4474,7 @@ static int md_run(mddev_t *mddev) | |||
4473 | printk(KERN_WARNING | 4474 | printk(KERN_WARNING |
4474 | "md: cannot register extra attributes for %s\n", | 4475 | "md: cannot register extra attributes for %s\n", |
4475 | mdname(mddev)); | 4476 | mdname(mddev)); |
4476 | mddev->sysfs_action = sysfs_get_dirent(mddev->kobj.sd, "sync_action"); | 4477 | mddev->sysfs_action = sysfs_get_dirent(mddev->kobj.sd, NULL, "sync_action"); |
4477 | } else if (mddev->ro == 2) /* auto-readonly not meaningful */ | 4478 | } else if (mddev->ro == 2) /* auto-readonly not meaningful */ |
4478 | mddev->ro = 0; | 4479 | mddev->ro = 0; |
4479 | 4480 | ||