diff options
author | NeilBrown <neilb@suse.de> | 2010-11-22 09:35:25 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-11-22 09:35:25 +0100 |
commit | b9b004ebc7abd5a4d8ddafef1fbf08409f24b330 (patch) | |
tree | 50314f3e1935caf9501ef0c3be71011c8f2f6d96 /policy.c | |
parent | Fix error in pol_sort. (diff) | |
download | mdadm-b9b004ebc7abd5a4d8ddafef1fbf08409f24b330.tar.xz mdadm-b9b004ebc7abd5a4d8ddafef1fbf08409f24b330.zip |
policy: don't try to get policy when path == NULL.
config_rules_has_path, we fail if path==NULL, so we should when
config_rules doesn't has_path too.
Signed-Off-By: NeilBrown <neilb@suse.de>
Diffstat (limited to 'policy.c')
-rw-r--r-- | policy.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -377,11 +377,10 @@ struct dev_policy *disk_policy(struct mdinfo *disk) if (!type) return NULL; - if (config_rules_has_path) { + if (config_rules_has_path) path = disk_path(disk); - if (!path) - return NULL; - } + if (!path) + return NULL; pol = path_policy(path, type); |