aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2004-07-13 19:26:20 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-07-13 19:26:20 -0700
commite9fb2fcd2b409ac149961c0ea99a43d57aa71f67 (patch)
tree83ffd71a1e05f11039133d8112f0ca6ef1b7e04e /fs
parentc2be62623f6f734a191cb36e4aded8b65a546a69 (diff)
downloadhistory-e9fb2fcd2b409ac149961c0ea99a43d57aa71f67.tar.gz
[PATCH] small style fixups for the new automount code
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/namespace.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 759527b1efe2ce..a8d4d0092e15d5 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -832,14 +832,12 @@ EXPORT_SYMBOL_GPL(do_add_mount);
void mark_mounts_for_expiry(struct list_head *mounts)
{
struct namespace *namespace;
- struct list_head graveyard, *_p, *_n;
- struct vfsmount *mnt;
+ struct vfsmount *mnt, *next;
+ LIST_HEAD(graveyard);
if (list_empty(mounts))
return;
- INIT_LIST_HEAD(&graveyard);
-
spin_lock(&vfsmount_lock);
/* extract from the expiration list every vfsmount that matches the
@@ -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
* cleared by mntput())
*/
- list_for_each_safe(_p, _n, mounts) {
- mnt = list_entry(_p, struct vfsmount, mnt_fslink);
-
+ list_for_each_entry_safe(mnt, next, mounts, mnt_fslink) {
if (!xchg(&mnt->mnt_expiry_mark, 1) ||
atomic_read(&mnt->mnt_count) != 1)
continue;
@@ -913,8 +909,7 @@ void mark_mounts_for_expiry(struct list_head *mounts)
}
mntput(mnt);
- }
- else {
+ } else {
/* someone brought it back to life whilst we didn't
* have any locks held so return it to the expiration
* list */