Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185704
b: refs/heads/master
c: 5b7e934
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Mar 3, 2010
1 parent cb6d78c commit 3244fe6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 62 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: 3899167dbd6832a3d8d7171b425257ad46b6c40c
refs/heads/master: 5b7e934d887c67fe093b61f1308bc2d9c49381ff
62 changes: 1 addition & 61 deletions trunk/fs/autofs4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,63 +96,6 @@ void autofs4_free_ino(struct autofs_info *ino)
kfree(ino);
}

/*
* Deal with the infamous "Busy inodes after umount ..." message.
*
* Clean up the dentry tree. This happens with autofs if the user
* space program goes away due to a SIGKILL, SIGSEGV etc.
*/
static void autofs4_force_release(struct autofs_sb_info *sbi)
{
struct dentry *this_parent = sbi->sb->s_root;
struct list_head *next;

if (!sbi->sb->s_root)
return;

spin_lock(&dcache_lock);
repeat:
next = this_parent->d_subdirs.next;
resume:
while (next != &this_parent->d_subdirs) {
struct dentry *dentry = list_entry(next, struct dentry, d_u.d_child);

/* Negative dentry - don`t care */
if (!simple_positive(dentry)) {
next = next->next;
continue;
}

if (!list_empty(&dentry->d_subdirs)) {
this_parent = dentry;
goto repeat;
}

next = next->next;
spin_unlock(&dcache_lock);

DPRINTK("dentry %p %.*s",
dentry, (int)dentry->d_name.len, dentry->d_name.name);

dput(dentry);
spin_lock(&dcache_lock);
}

if (this_parent != sbi->sb->s_root) {
struct dentry *dentry = this_parent;

next = this_parent->d_u.d_child.next;
this_parent = this_parent->d_parent;
spin_unlock(&dcache_lock);
DPRINTK("parent dentry %p %.*s",
dentry, (int)dentry->d_name.len, dentry->d_name.name);
dput(dentry);
spin_lock(&dcache_lock);
goto resume;
}
spin_unlock(&dcache_lock);
}

void autofs4_kill_sb(struct super_block *sb)
{
struct autofs_sb_info *sbi = autofs4_sbi(sb);
Expand All @@ -169,15 +112,12 @@ void autofs4_kill_sb(struct super_block *sb)
/* Free wait queues, close pipe */
autofs4_catatonic_mode(sbi);

/* Clean up and release dangling references */
autofs4_force_release(sbi);

sb->s_fs_info = NULL;
kfree(sbi);

out_kill_sb:
DPRINTK("shutting down");
kill_anon_super(sb);
kill_litter_super(sb);
}

static int autofs4_show_options(struct seq_file *m, struct vfsmount *mnt)
Expand Down

0 comments on commit 3244fe6

Please sign in to comment.