From: NeilBrown <neilb@cse.unsw.edu.au>
fh_dup2 duplicates an entire svc_fh structure, so in addition to dget()'ing
the dentry, it also needs to bump the reference count on fh_export.
Moved it out of the header file into nfsfh.c for the simple reason that I
couldn't figure out how to reorganize the headers files right so that the
fh_dup2 could use the definition of svc_fh. Since fh_dup2 is never actually
used outside of nfs4proc.c, it could just as well be moved there....
#define NFSDDBG_FACILITY NFSDDBG_PROC
+static inline void
+fh_dup2(struct svc_fh *dst, struct svc_fh *src)
+{
+ fh_put(dst);
+ dget(src->fh_dentry);
+ if (src->fh_export)
+ cache_get(&src->fh_export->h);
+ *dst = *src;
+}
+
static int
do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open)
{
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)
{