patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / include / linux / nfsd / export.h
index 2042946..6bad476 100644 (file)
@@ -110,6 +110,10 @@ static inline void exp_put(struct svc_export *exp)
        svc_export_put(&exp->h, &svc_export_cache);
 }
 
+static inline void exp_get(struct svc_export *exp)
+{
+       cache_get(&exp->h);
+}
 static inline struct svc_export *
 exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv,
         struct cache_req *reqp)
@@ -118,10 +122,9 @@ exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv,
        if (ek && !IS_ERR(ek)) {
                struct svc_export *exp = ek->ek_export;
                int err;
-               cache_get(&exp->h);
+               exp_get(exp);
                expkey_put(&ek->h, &svc_expkey_cache);
-               if (exp &&
-                   (err = cache_check(&svc_export_cache, &exp->h, reqp)))
+               if ((err = cache_check(&svc_export_cache, &exp->h, reqp)))
                        exp = ERR_PTR(err);
                return exp;
        } else