summaryrefslogtreecommitdiff
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-14 20:01:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-14 20:01:41 -0700
commit9e0ce554b039e3df288d83189ecf226c16da04af (patch)
tree4be797c49516bb99e1a7a994302643c6c02603c2 /fs/namespace.c
parente253d98f5babbec7e6ced810f7335b265a7f7e83 (diff)
parent1985296a3ccd5d89d2ec2ca17b1fa1a225f8ecd1 (diff)
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc leftovers from Al Viro. * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix the __user misannotations in asm-generic get_user/put_user fput: Don't reinvent the wheel but use existing llist API namespace.c: Don't reinvent the wheel but use existing llist API
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index e48ad0192d81..54059b142d6b 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1182,12 +1182,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);