14.11.2012 17:02, Jeff Layton пишет:
On Tue, 13 Nov 2012 18:48:33 +0300 Stanislav Kinsbursky <[email protected]> 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

