Skip to content

Commit 30ff060

Browse files
Christoph Hellwigtrondmypd
authored andcommitted
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>
1 parent 9dd2fcd commit 30ff060

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎fs/nfs/pnfs.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,13 @@ void nfs4_deviceid_purge_client(const struct nfs_client *);
280280
int nfs4_deviceid_getdevicelist(struct nfs_server *server,
281281
const struct nfs_fh *fh);
282282

283+
static inline struct nfs4_deviceid_node *
284+
nfs4_get_deviceid(struct nfs4_deviceid_node *d)
285+
{
286+
atomic_inc(&d->ref);
287+
return d;
288+
}
289+
283290
static inline struct pnfs_layout_segment *
284291
pnfs_get_lseg(struct pnfs_layout_segment *lseg)
285292
{

0 commit comments

Comments
 (0)