Commit 38782482 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] kNFSd: new routine fh_dup2()

Define fh_dup2(), which copies a _verified_ filehandle, taking care
of refcounts accordingly.  (This will be used by RESTOREFH/SAVEFH and
a few other places.)
parent 18d9355d
...@@ -251,6 +251,14 @@ fh_copy(struct svc_fh *dst, struct svc_fh *src) ...@@ -251,6 +251,14 @@ fh_copy(struct svc_fh *dst, struct svc_fh *src)
return dst; return dst;
} }
static __inline__ void
fh_dup2(struct svc_fh *dst, struct svc_fh *src)
{
fh_put(dst);
dget(src->fh_dentry);
*dst = *src;
}
static __inline__ struct svc_fh * static __inline__ struct svc_fh *
fh_init(struct svc_fh *fhp, int maxsize) fh_init(struct svc_fh *fhp, int maxsize)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment