diff --git a/fs/namespace.c b/fs/namespace.c index f8893dc6a989dc6c9b0f4e8daba2e985a64976e6..ce82a5b2da12e6982c41f5da8b08b9f29aa99708 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -1124,12 +1124,10 @@ static LLIST_HEAD(delayed_mntput_list); static void delayed_mntput(struct work_struct *unused) { struct llist_node *node = llist_del_all(&delayed_mntput_list); - struct llist_node *next; + struct mount *m, *t; - for (; node; node = next) { - next = llist_next(node); - cleanup_mnt(llist_entry(node, struct mount, mnt_llist)); - } + llist_for_each_entry_safe(m, t, node, mnt_llist) + cleanup_mnt(m); } static DECLARE_DELAYED_WORK(delayed_mntput_work, delayed_mntput);