summaryrefslogtreecommitdiff
path: root/policy.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-11-22 19:35:25 +1100
committerNeilBrown <neilb@suse.de>2010-11-22 19:35:25 +1100
commitb9b004ebc7abd5a4d8ddafef1fbf08409f24b330 (patch)
tree50314f3e1935caf9501ef0c3be71011c8f2f6d96 /policy.c
parent37194990aae3dfdbaae55fb9d2ab491683ade7e1 (diff)
downloadmdadm-b9b004ebc7abd5a4d8ddafef1fbf08409f24b330.tar.gz
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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/policy.c b/policy.c
index 5f18034..0bc3c45 100644
--- a/policy.c
+++ b/policy.c
@@ -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);