Răsfoiți Sursa

pnfs: add a nfs4_get_deviceid helper

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>
Christoph Hellwig 11 ani în urmă
părinte
comite
30ff0603ca
1 a modificat fișierele cu 7 adăugiri și 0 ștergeri
  1. 7 0
      fs/nfs/pnfs.h

+ 7 - 0
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)
 {