locks: fix file_lock deletion inside loop
authorYan, Zheng <zyan@redhat.com>
Fri, 27 Mar 2015 02:34:20 +0000 (10:34 +0800)
committerJeff Layton <jeff.layton@primarydata.com>
Fri, 27 Mar 2015 11:18:20 +0000 (07:18 -0400)
commita901125c65544aa05c52e1a7388c3900e8af105f
tree7fffcbe51519876521a175597428ca7e6e64c0b1
parent3c435c1e472ba344ee25f795f4807d4457e61f6c
locks: fix file_lock deletion inside loop

locks_delete_lock_ctx() is called inside the loop, so we
should use list_for_each_entry_safe.

Fixes: 8634b51f6ca2 (locks: convert lease handling to file_lock_context)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
fs/locks.c