Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132952235
D20743.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
971 B
Referenced Files
None
Subscribers
None
D20743.id.diff
View Options
Index: head/sys/geom/eli/g_eli.c
===================================================================
--- head/sys/geom/eli/g_eli.c
+++ head/sys/geom/eli/g_eli.c
@@ -827,7 +827,7 @@
struct g_provider *pp;
struct g_consumer *cp;
u_int i, threads;
- int error;
+ int dcw, error;
G_ELI_DEBUG(1, "Creating device %s%s.", bpp->name, G_ELI_SUFFIX);
@@ -881,10 +881,8 @@
* We don't open provider for writing only when user requested read-only
* access.
*/
- if (sc->sc_flags & G_ELI_FLAG_RO)
- error = g_access(cp, 1, 0, 1);
- else
- error = g_access(cp, 1, 1, 1);
+ dcw = (sc->sc_flags & G_ELI_FLAG_RO) ? 0 : 1;
+ error = g_access(cp, 1, dcw, 1);
if (error != 0) {
if (req != NULL) {
gctl_error(req, "Cannot access %s (error=%d).",
@@ -996,7 +994,7 @@
mtx_destroy(&sc->sc_queue_mtx);
if (cp->provider != NULL) {
if (cp->acr == 1)
- g_access(cp, -1, -1, -1);
+ g_access(cp, -1, -dcw, -1);
g_detach(cp);
}
g_destroy_consumer(cp);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 22, 11:37 AM (13 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24033732
Default Alt Text
D20743.id.diff (971 B)
Attached To
Mode
D20743: g_eli_create: only dec g_access acw if we inc'd it
Attached
Detach File
Event Timeline
Log In to Comment