From be40ede44ac6a8603e68306aa7a3910300e9dcc7 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Thu, 1 Aug 1996 21:23:52 +0000 Subject: (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.) --- libdiskfs/file-get-transcntl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libdiskfs') 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; } -- cgit v1.2.3