diff options
author | Byungchul Park <byungchul.park@lge.com> | 2017-08-07 10:44:45 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-08-28 06:50:22 +0200 |
commit | 29785735788be2450c5f3b1fda61864aaeca38fd (patch) | |
tree | b125cbfb421d0ca23b3c03a2e32bae2dd3166687 /fs/namespace.c | |
parent | Linux 4.13-rc7 (diff) | |
download | linux-29785735788be2450c5f3b1fda61864aaeca38fd.tar.xz linux-29785735788be2450c5f3b1fda61864aaeca38fd.zip |
namespace.c: Don't reinvent the wheel but use existing llist API
Although llist provides proper APIs, they are not used. Make them used.
Signed-off-by: Byungchul Park <byungchul.park@lge.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index f8893dc6a989..ce82a5b2da12 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); |