summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1996-08-01 21:23:52 +0000
committerThomas Bushnell <thomas@gnu.org>1996-08-01 21:23:52 +0000
commitbe40ede44ac6a8603e68306aa7a3910300e9dcc7 (patch)
treebece0dce20b9df01048bac61af7f26e7d143d4a4
parent2da39d27018b19f9fde748a1fbd69ec55dbc5c59 (diff)
(diskfs_S_file_get_translator_cntl): Don't diskfs_nput NP; we never
created a reference. Just unlock. (And bother to lock it in the first place.)
-rw-r--r--libdiskfs/file-get-transcntl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libdiskfs/file-get-transcntl.c b/libdiskfs/file-get-transcntl.c
index 2c31c2d1..adda4477 100644
--- a/libdiskfs/file-get-transcntl.c
+++ b/libdiskfs/file-get-transcntl.c
@@ -1,5 +1,5 @@
/* libkdiskfs implementation of fs.defs: file_get_translator_cntl
- Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation
+ Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -32,6 +32,7 @@ diskfs_S_file_get_translator_cntl (struct protid *cred,
np = cred->po->np;
+ mutex_lock (&np->lock);
error = diskfs_isowner (np, cred);
if (!error)
error = fshelp_fetch_control (&np->transbox, ctl);
@@ -39,6 +40,6 @@ diskfs_S_file_get_translator_cntl (struct protid *cred,
error = ENXIO;
if (!error)
*ctltype = MACH_MSG_TYPE_COPY_SEND;
- diskfs_nput (np);
+ mutex_unlock (&np->lock);
return error;
}