diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-01-29 14:06:15 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-02-25 11:19:00 +0100 |
commit | 86e3141aaf13b1bc55d74bd6f557a62b814e944c (patch) | |
tree | 5478d2359f55b2aae2461695ea4b7bdeb50afdaf /libdiskfs/diskfs.h | |
parent | 982261fec4707d0c8d0723d90d9c0e465d98aa93 (diff) |
libdiskfs: fix receiver lookups in fsys server functions
* libdiskfs/diskfs.h (struct diskfs_control): New declaration.
(diskfs_begin_using_control_port): New declaration and function.
(diskfs_end_using_control_port): Likewise.
* libdiskfs/fsmutations.h: Add translation functions.
* libdiskfs/priv.h (control_t): New type declaration for mig.
* libdiskfs/boot-start.c: Fix receiver lookups.
* libdiskfs/fsys-getfile.c: Likewise.
* libdiskfs/fsys-getroot.c: Likewise.
* libdiskfs/fsys-goaway.c: Likewise.
* libdiskfs/fsys-options.c: Likewise.
* libdiskfs/fsys-syncfs.c: Likewise.
Diffstat (limited to 'libdiskfs/diskfs.h')
-rw-r--r-- | libdiskfs/diskfs.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index db6a1d84..359b11b8 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -121,6 +121,11 @@ struct node int author_tracks_uid; }; +struct diskfs_control +{ + struct port_info pi; +}; + /* Possibly lookup types for diskfs_lookup call */ enum lookup_type { @@ -795,8 +800,10 @@ error_t diskfs_start_protid (struct peropen *po, struct protid **cred); void diskfs_finish_protid (struct protid *cred, struct iouser *user); extern struct protid * diskfs_begin_using_protid_port (file_t port); +extern struct diskfs_control * diskfs_begin_using_control_port (fsys_t port); extern void diskfs_end_using_protid_port (struct protid *cred); +extern void diskfs_end_using_control_port (struct diskfs_control *cred); #if defined(__USE_EXTERN_INLINES) || defined(DISKFS_DEFINE_EXTERN_INLINE) @@ -809,6 +816,13 @@ diskfs_begin_using_protid_port (file_t port) return ports_lookup_port (diskfs_port_bucket, port, diskfs_protid_class); } +/* And for the fsys interface. */ +DISKFS_EXTERN_INLINE struct diskfs_control * +diskfs_begin_using_control_port (fsys_t port) +{ + return ports_lookup_port (diskfs_port_bucket, port, NULL); +} + /* Called by MiG after server routines have been run; this balances begin_using_protid_port, and is arranged for the io and fs interfaces by fsmutations.h. */ @@ -819,6 +833,14 @@ diskfs_end_using_protid_port (struct protid *cred) ports_port_deref (cred); } +/* And for the fsys interface. */ +DISKFS_EXTERN_INLINE void +diskfs_end_using_control_port (struct diskfs_control *cred) +{ + if (cred) + ports_port_deref (cred); +} + #endif /* Use extern inlines. */ /* Called when a protid CRED has no more references. (Because references\ |