summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/io-stat.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libdiskfs/io-stat.c b/libdiskfs/io-stat.c
index 4e504b3a..757e84e4 100644
--- a/libdiskfs/io-stat.c
+++ b/libdiskfs/io-stat.c
@@ -16,6 +16,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "priv.h"
+#include "io_S.h"
/* Implement io_stat as described in <hurd/io.defs>. */
error_t
@@ -29,12 +30,9 @@ diskfs_S_io_stat (struct protid *cred,
return EOPNOTSUPP;
np = cred->po->np;
- mutex_lock (&ip->lock);
- error = ioserver_get_conch (&ip->i_conch);
- if (!error)
- bcopy (np->dn_stat, statbuf, sizeof (struct stat));
-
- out:
- mutex_unlock (&ip->i_toplock);
+ mutex_lock (&np->lock);
+ ioserver_get_conch (&ip->conch);
+ bcopy (&np->dn_stat, statbuf, sizeof (struct stat));
+ mutex_unlock (&np->lock);
return error;
}