Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280178
b: refs/heads/master
c: 692afc3
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Jan 4, 2012
1 parent 4f0ac14 commit caac7a7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 761d5c38eb3d8e2aa7394726dccab245bfe2f41c
refs/heads/master: 692afc312b38c9367a1125927941d33ab2ce852a
28 changes: 14 additions & 14 deletions trunk/fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ void umount_tree(struct mount *mnt, int propagate, struct list_head *kill)
list_splice(&tmp_list, kill);
}

static void shrink_submounts(struct vfsmount *mnt, struct list_head *umounts);
static void shrink_submounts(struct mount *mnt, struct list_head *umounts);

static int do_umount(struct vfsmount *mnt, int flags)
{
Expand Down Expand Up @@ -1322,7 +1322,7 @@ static int do_umount(struct vfsmount *mnt, int flags)
event++;

if (!(flags & MNT_DETACH))
shrink_submounts(mnt, &umount_list);
shrink_submounts(real_mount(mnt), &umount_list);

retval = -EBUSY;
if (flags & MNT_DETACH || !propagate_mount_busy(mnt, 2)) {
Expand Down Expand Up @@ -2121,41 +2121,41 @@ EXPORT_SYMBOL_GPL(mark_mounts_for_expiry);
* search the list of submounts for a given mountpoint, and move any
* shrinkable submounts to the 'graveyard' list.
*/
static int select_submounts(struct vfsmount *parent, struct list_head *graveyard)
static int select_submounts(struct mount *parent, struct list_head *graveyard)
{
struct vfsmount *this_parent = parent;
struct mount *this_parent = parent;
struct list_head *next;
int found = 0;

repeat:
next = this_parent->mnt_mounts.next;
next = this_parent->mnt.mnt_mounts.next;
resume:
while (next != &this_parent->mnt_mounts) {
while (next != &this_parent->mnt.mnt_mounts) {
struct list_head *tmp = next;
struct vfsmount *mnt = list_entry(tmp, struct vfsmount, mnt_child);
struct mount *mnt = list_entry(tmp, struct mount, mnt.mnt_child);

next = tmp->next;
if (!(mnt->mnt_flags & MNT_SHRINKABLE))
if (!(mnt->mnt.mnt_flags & MNT_SHRINKABLE))
continue;
/*
* Descend a level if the d_mounts list is non-empty.
*/
if (!list_empty(&mnt->mnt_mounts)) {
if (!list_empty(&mnt->mnt.mnt_mounts)) {
this_parent = mnt;
goto repeat;
}

if (!propagate_mount_busy(mnt, 1)) {
list_move_tail(&mnt->mnt_expire, graveyard);
if (!propagate_mount_busy(&mnt->mnt, 1)) {
list_move_tail(&mnt->mnt.mnt_expire, graveyard);
found++;
}
}
/*
* All done at this level ... ascend and resume the search
*/
if (this_parent != parent) {
next = this_parent->mnt_child.next;
this_parent = this_parent->mnt_parent;
next = this_parent->mnt.mnt_child.next;
this_parent = real_mount(this_parent->mnt.mnt_parent);
goto resume;
}
return found;
Expand All @@ -2167,7 +2167,7 @@ static int select_submounts(struct vfsmount *parent, struct list_head *graveyard
*
* vfsmount_lock must be held for write
*/
static void shrink_submounts(struct vfsmount *mnt, struct list_head *umounts)
static void shrink_submounts(struct mount *mnt, struct list_head *umounts)
{
LIST_HEAD(graveyard);
struct mount *m;
Expand Down

0 comments on commit caac7a7

Please sign in to comment.