Commit e9fb2fcd authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[PATCH] small style fixups for the new automount code

Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c2be6262
...@@ -832,14 +832,12 @@ EXPORT_SYMBOL_GPL(do_add_mount); ...@@ -832,14 +832,12 @@ EXPORT_SYMBOL_GPL(do_add_mount);
void mark_mounts_for_expiry(struct list_head *mounts) void mark_mounts_for_expiry(struct list_head *mounts)
{ {
struct namespace *namespace; struct namespace *namespace;
struct list_head graveyard, *_p, *_n; struct vfsmount *mnt, *next;
struct vfsmount *mnt; LIST_HEAD(graveyard);
if (list_empty(mounts)) if (list_empty(mounts))
return; return;
INIT_LIST_HEAD(&graveyard);
spin_lock(&vfsmount_lock); spin_lock(&vfsmount_lock);
/* extract from the expiration list every vfsmount that matches the /* extract from the expiration list every vfsmount that matches the
...@@ -848,9 +846,7 @@ void mark_mounts_for_expiry(struct list_head *mounts) ...@@ -848,9 +846,7 @@ void mark_mounts_for_expiry(struct list_head *mounts)
* - still marked for expiry (marked on the last call here; marks are * - still marked for expiry (marked on the last call here; marks are
* cleared by mntput()) * cleared by mntput())
*/ */
list_for_each_safe(_p, _n, mounts) { list_for_each_entry_safe(mnt, next, mounts, mnt_fslink) {
mnt = list_entry(_p, struct vfsmount, mnt_fslink);
if (!xchg(&mnt->mnt_expiry_mark, 1) || if (!xchg(&mnt->mnt_expiry_mark, 1) ||
atomic_read(&mnt->mnt_count) != 1) atomic_read(&mnt->mnt_count) != 1)
continue; continue;
...@@ -913,8 +909,7 @@ void mark_mounts_for_expiry(struct list_head *mounts) ...@@ -913,8 +909,7 @@ void mark_mounts_for_expiry(struct list_head *mounts)
} }
mntput(mnt); mntput(mnt);
} } else {
else {
/* someone brought it back to life whilst we didn't /* someone brought it back to life whilst we didn't
* have any locks held so return it to the expiration * have any locks held so return it to the expiration
* list */ * list */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment