]> err.no Git - linux-2.6/blobdiff - fs/nfs/super.c
USB: misc: phidgetkit: clean up urb->status usage
[linux-2.6] / fs / nfs / super.c
index a2b1af89ca1af331763a35f3b90f83864edd66d7..b34b7a711d5b6e3e7f8280b71ee26940523f0eaf 100644 (file)
@@ -300,7 +300,10 @@ static const struct super_operations nfs4_sops = {
 };
 #endif
 
-static struct shrinker *acl_shrinker;
+static struct shrinker acl_shrinker = {
+       .shrink         = nfs_access_cache_shrinker,
+       .seeks          = DEFAULT_SEEKS,
+};
 
 /*
  * Register the NFS filesystems
@@ -321,7 +324,7 @@ int __init register_nfs_fs(void)
        if (ret < 0)
                goto error_2;
 #endif
-       acl_shrinker = set_shrinker(DEFAULT_SEEKS, nfs_access_cache_shrinker);
+       register_shrinker(&acl_shrinker);
        return 0;
 
 #ifdef CONFIG_NFS_V4
@@ -339,8 +342,7 @@ error_0:
  */
 void __exit unregister_nfs_fs(void)
 {
-       if (acl_shrinker != NULL)
-               remove_shrinker(acl_shrinker);
+       unregister_shrinker(&acl_shrinker);
 #ifdef CONFIG_NFS_V4
        unregister_filesystem(&nfs4_fs_type);
        nfs_unregister_sysctl();
@@ -1683,6 +1685,9 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
 
                dprintk("MNTPATH: %s\n", *mntpath);
 
+               if (args.client_address == NULL)
+                       goto out_no_client_address;
+
                *ip_addr = args.client_address;
 
                break;
@@ -1703,6 +1708,10 @@ out_inval_auth:
 out_no_address:
        dfprintk(MOUNT, "NFS4: mount program didn't pass remote address\n");
        return -EINVAL;
+
+out_no_client_address:
+       dfprintk(MOUNT, "NFS4: mount program didn't pass callback address\n");
+       return -EINVAL;
 }
 
 /*