2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 09:43:59 +08:00

mnt: Use hlist_move_list in namespace_unlock

Small cleanup to make the code more readable and maintainable.

Signed-off-by: Eric Biederman <ebiederm@xmission.com>
This commit is contained in:
Eric W. Biederman 2015-04-02 20:33:53 -05:00
parent e42391cd04
commit a3b3c5627c

View File

@ -1298,17 +1298,15 @@ static HLIST_HEAD(unmounted); /* protected by namespace_sem */
static void namespace_unlock(void)
{
struct hlist_head head = unmounted;
struct hlist_head head;
if (likely(hlist_empty(&head))) {
up_write(&namespace_sem);
return;
}
hlist_move_list(&unmounted, &head);
head.first->pprev = &head.first;
INIT_HLIST_HEAD(&unmounted);
up_write(&namespace_sem);
if (likely(hlist_empty(&head)))
return;
synchronize_rcu();
group_pin_kill(&head);