summaryrefslogtreecommitdiff
path: root/fs/afs/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-11-21 09:12:17 +0000
committerDavid Howells <dhowells@redhat.com>2019-11-21 09:12:17 +0000
commitd4438a25295d87d189e1925e0f7de2edcfe66582 (patch)
tree4c8c4ee14cf08efd4a71e650f467bc0b4bef6908 /fs/afs/internal.h
parent0b9c0174d6b611356038e26d9434ad873f58e270 (diff)
afs: Introduce an afs_get_read() refcount helper
Introduce an afs_get_read() helper to get a reference on an afs_read object. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r--fs/afs/internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 8440834a1c51..1d81fc4c3058 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -934,6 +934,12 @@ extern int afs_fetch_data(struct afs_vnode *, struct key *, struct afs_read *);
extern int afs_page_filler(void *, struct page *);
extern void afs_put_read(struct afs_read *);
+static inline struct afs_read *afs_get_read(struct afs_read *req)
+{
+ refcount_inc(&req->usage);
+ return req;
+}
+
/*
* flock.c
*/