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>
This commit is contained in:
David Howells
2019-11-21 09:12:17 +00:00
parent 0b9c0174d6
commit d4438a2529
3 changed files with 9 additions and 6 deletions

View File

@@ -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
*/