]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
pnfs: add a nfs4_get_deviceid helper
authorChristoph Hellwig <hch@lst.de>
Wed, 3 Sep 2014 04:27:59 +0000 (21:27 -0700)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 10 Sep 2014 19:47:04 +0000 (12:47 -0700)
This will be used by the block layout driver when splitting extents.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/pnfs.h

index 3eeca49d9ca2f9e194e8a88a9910530426e2492e..d84fe29fc88baa358c3af04750a8a7f1b98d1ca5 100644 (file)
@@ -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)
 {