aboutsummaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/io-map.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libdiskfs/io-map.c b/libdiskfs/io-map.c
index 82e6e233..00d6bdcd 100644
--- a/libdiskfs/io-map.c
+++ b/libdiskfs/io-map.c
@@ -29,8 +29,10 @@ diskfs_S_io_map (struct protid *cred,
if (!cred)
return EOPNOTSUPP;
+ mutex_lock (&cred->po->np->lock);
*rdobj = diskfs_get_filemap (cred->po->np);
- *rdtype = *wrtype = MACH_MSG_TYPE_COPY_SEND;
+ mutex_unlock (&cred->po->np->lock);
+ *rdtype = *wrtype = MACH_MSG_TYPE_MOVE_SEND;
*wrobj = *rdobj;
return 0;
}