Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx> --- fs/nfsd/nfs4pnfsdlm.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/nfs4pnfsdlm.c b/fs/nfsd/nfs4pnfsdlm.c index 18d4c0d..006ded5 100644 --- a/fs/nfsd/nfs4pnfsdlm.c +++ b/fs/nfsd/nfs4pnfsdlm.c @@ -209,12 +209,13 @@ out_free: void nfsd4_pnfs_dlm_shutdown(void) { - struct dlm_device_entry *dlm_pdev; + struct dlm_device_entry *dlm_pdev, *next; dprintk("--> %s\n", __func__); spin_lock(&dlm_device_list_lock); - list_for_each_entry(dlm_pdev, &dlm_device_list, dlm_dev_list) { + list_for_each_entry_safe (dlm_pdev, next, &dlm_device_list, + dlm_dev_list) { list_del(&dlm_pdev->dlm_dev_list); kfree(dlm_pdev); } -- 1.6.6.1 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html