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.) --- old/include/linux/nfsd/nfsfh.h Thu Aug 1 16:16:29 2002 +++ new/include/linux/nfsd/nfsfh.h Sun Aug 11 22:56:12 2002 @@ -238,6 +238,14 @@ fh_copy(struct svc_fh *dst, struct svc_f 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 * fh_init(struct svc_fh *fhp, int maxsize) {