diff options
author | David Howells <dhowells@redhat.com> | 2019-04-25 14:26:50 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-04-25 14:26:50 +0100 |
commit | 0b9bf3812ad1f0d937584e300826285694f53e2b (patch) | |
tree | 9c92ffe7329d7a563c182b8c4b7beb776683888c /fs/afs/internal.h | |
parent | cd8dead0c39457e58ec1d36db93aedca811d48f1 (diff) |
afs: Split wait from afs_make_call()
Split the call to afs_wait_for_call_to_complete() from afs_make_call() to
make it easier to handle asynchronous calls and to make it easier to
convert a synchronous call to an asynchronous one in future, for instance
when someone tries to interrupt an operation by pressing Ctrl-C.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r-- | fs/afs/internal.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 3904ab0b9563..61e24551574d 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -939,8 +939,9 @@ extern int afs_fs_extend_lock(struct afs_fs_cursor *); extern int afs_fs_release_lock(struct afs_fs_cursor *); extern int afs_fs_give_up_all_callbacks(struct afs_net *, struct afs_server *, struct afs_addr_cursor *, struct key *); -extern int afs_fs_get_capabilities(struct afs_net *, struct afs_server *, - struct afs_addr_cursor *, struct key *, unsigned int, bool); +extern struct afs_call *afs_fs_get_capabilities(struct afs_net *, struct afs_server *, + struct afs_addr_cursor *, struct key *, + unsigned int); extern int afs_fs_inline_bulk_status(struct afs_fs_cursor *, struct afs_net *, struct afs_fid *, struct afs_file_status *, struct afs_callback *, unsigned int, @@ -1073,7 +1074,8 @@ extern int __net_init afs_open_socket(struct afs_net *); extern void __net_exit afs_close_socket(struct afs_net *); extern void afs_charge_preallocation(struct work_struct *); extern void afs_put_call(struct afs_call *); -extern long afs_make_call(struct afs_addr_cursor *, struct afs_call *, gfp_t, bool); +extern void afs_make_call(struct afs_addr_cursor *, struct afs_call *, gfp_t); +extern long afs_wait_for_call_to_complete(struct afs_call *, struct afs_addr_cursor *); extern struct afs_call *afs_alloc_flat_call(struct afs_net *, const struct afs_call_type *, size_t, size_t); @@ -1218,8 +1220,8 @@ extern void afs_fs_exit(void); extern struct afs_vldb_entry *afs_vl_get_entry_by_name_u(struct afs_vl_cursor *, const char *, int); extern struct afs_addr_list *afs_vl_get_addrs_u(struct afs_vl_cursor *, const uuid_t *); -extern int afs_vl_get_capabilities(struct afs_net *, struct afs_addr_cursor *, struct key *, - struct afs_vlserver *, unsigned int, bool); +extern struct afs_call *afs_vl_get_capabilities(struct afs_net *, struct afs_addr_cursor *, + struct key *, struct afs_vlserver *, unsigned int); extern struct afs_addr_list *afs_yfsvl_get_endpoints(struct afs_vl_cursor *, const uuid_t *); /* |