From: Christoph Hellwig Date: Wed, 3 Sep 2014 04:27:59 +0000 (-0700) Subject: pnfs: add a nfs4_get_deviceid helper X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=30ff0603ca4d66c8244efc80ea8470d3d04aee8b;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git pnfs: add a nfs4_get_deviceid helper This will be used by the block layout driver when splitting extents. Signed-off-by: Christoph Hellwig Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index 3eeca49d9ca2..d84fe29fc88b 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h @@ -280,6 +280,13 @@ void nfs4_deviceid_purge_client(const struct nfs_client *); int nfs4_deviceid_getdevicelist(struct nfs_server *server, const struct nfs_fh *fh); +static inline struct nfs4_deviceid_node * +nfs4_get_deviceid(struct nfs4_deviceid_node *d) +{ + atomic_inc(&d->ref); + return d; +} + static inline struct pnfs_layout_segment * pnfs_get_lseg(struct pnfs_layout_segment *lseg) {