lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <50A39B2D.6070206@parallels.com>
Date:	Wed, 14 Nov 2012 17:22:53 +0400
From:	Stanislav Kinsbursky <skinsbursky@...allels.com>
To:	Jeff Layton <jlayton@...hat.com>
CC:	"bfields@...ldses.org" <bfields@...ldses.org>,
	"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
	"devel@...nvz.org" <devel@...nvz.org>,
	"Trond.Myklebust@...app.com" <Trond.Myklebust@...app.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 03/15] nfsd: make reclaim_str_hashtbl allocated per net

14.11.2012 17:02, Jeff Layton пишет:
> On Tue, 13 Nov 2012 18:48:33 +0300
> Stanislav Kinsbursky <skinsbursky@...allels.com> wrote:
>
<snip>
>>
>> +
>> +static int
>> +nfs4_legacy_state_init(struct net *net)
>> +{
>> +     struct nfsd_net *nn = net_generic(net, nfsd_net_id);
>> +     int i;
>> +
>> +     nn->reclaim_str_hashtbl = kmalloc(sizeof(struct list_head) *
>> +                                       CLIENT_HASH_SIZE, GFP_KERNEL);
>> +     if (!nn->reclaim_str_hashtbl)
>> +             return -ENOMEM;
>> +
>> +     for (i = 0; i < CLIENT_HASH_SIZE; i++)
>> +             INIT_LIST_HEAD(&nn->reclaim_str_hashtbl[i]);
>> +     nn->reclaim_str_hashtbl_size = 0;
>> +
>> +     return 0;
>> +}
>> +
>> +static void
>> +nfs4_legacy_state_shutdown(struct net *net)
>> +{
>> +     struct nfsd_net *nn = net_generic(net, nfsd_net_id);
>> +
>> +     kfree(nn->reclaim_str_hashtbl);
>> +}
>> +
>>   static int
>>   nfsd4_load_reboot_recovery_data(struct net *net)
>>   {
>> @@ -425,13 +454,23 @@ nfsd4_load_reboot_recovery_data(struct net *net)
>>                return -EINVAL;
>>        }
>>
>> +     status = nfs4_legacy_state_init(net);
>> +     if (status)
>> +             return status;
>> +
>
> nit: might be clearer to create a new legacy ->init function and have
> it call the state_init and then load the recovery data.
>

Yep, sure.

>
> Looks like a reasonable and good change, but may need reconciling with
> the patches from me that Bruce merged recently into his for-next tree.
>

Thanks. Already working on it.

-- 
Best regards,
Stanislav Kinsbursky
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ