]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfsd/nfs4idmap.c
cciss: fix sysfs broken symlink regression
[linux-2.6-omap-h63xx.git] / fs / nfsd / nfs4idmap.c
index ef22179c49ad6f768303c8c946fe4211acaf516b..5b398421b0518130240157dd2b02aa4c77a6ed0a 100644 (file)
@@ -202,7 +202,7 @@ static struct cache_detail idtoname_cache = {
        .alloc          = ent_alloc,
 };
 
-int
+static int
 idtoname_parse(struct cache_detail *cd, char *buf, int buflen)
 {
        struct ent ent, *res;
@@ -464,11 +464,18 @@ nametoid_update(struct ent *new, struct ent *old)
  * Exported API
  */
 
-void
+int
 nfsd_idmap_init(void)
 {
-       cache_register(&idtoname_cache);
-       cache_register(&nametoid_cache);
+       int rv;
+
+       rv = cache_register(&idtoname_cache);
+       if (rv)
+               return rv;
+       rv = cache_register(&nametoid_cache);
+       if (rv)
+               cache_unregister(&idtoname_cache);
+       return rv;
 }
 
 void