summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-01-03 09:49:10 +0000
committerrwatson <rwatson@FreeBSD.org>2006-01-03 09:49:10 +0000
commit428f554873ce3fe7c4e07271e411bd21584cc74d (patch)
treeadc1bccf8503f883757e1e6d43d3b8f5c66a87d6 /sys/fs
parent75107ac807800d6b2d84af45093d4e3572f35e57 (diff)
downloadFreeBSD-src-428f554873ce3fe7c4e07271e411bd21584cc74d.zip
FreeBSD-src-428f554873ce3fe7c4e07271e411bd21584cc74d.tar.gz
When returning EIO from DEVFSIO_RADD ioctl, drop the exclusive rule
lock. Otherwise the system comes to a rather sudden and grinding halt. MFC after: 1 week
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/devfs/devfs_rule.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/fs/devfs/devfs_rule.c b/sys/fs/devfs/devfs_rule.c
index 840f9f9..bfd23b7 100644
--- a/sys/fs/devfs/devfs_rule.c
+++ b/sys/fs/devfs/devfs_rule.c
@@ -186,8 +186,10 @@ devfs_rules_ioctl(struct devfs_mount *dm, u_long cmd, caddr_t data, struct threa
error = EEXIST;
break;
}
- if (rid2rsn(dr->dr_id) == 0)
- return (EIO);
+ if (rid2rsn(dr->dr_id) == 0) {
+ error = EIO;
+ break;
+ }
error = devfs_rule_insert(dr);
break;
case DEVFSIO_RAPPLY:
OpenPOWER on IntegriCloud