Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39367
b: refs/heads/master
c: 6ce3152
h: refs/heads/master
i:
  39365: 3feaf8c
  39363: 5ae9aae
  39359: 3426512
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Oct 11, 2006
1 parent 21ee2fb commit 27b5574
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 23 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: edc666e2ff9ec2e4e9510f1127c68c22cffc93f6
refs/heads/master: 6ce315234aefcbc599dea390c15672156ebf9e7b
3 changes: 1 addition & 2 deletions trunk/fs/autofs4/autofs_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ struct autofs_wait_queue {

struct autofs_sb_info {
u32 magic;
struct dentry *root;
int pipefd;
struct file *pipe;
pid_t oz_pgrp;
Expand Down Expand Up @@ -229,4 +228,4 @@ static inline int __simple_empty(struct dentry *dentry)
}

void autofs4_dentry_release(struct dentry *);

extern void autofs4_kill_sb(struct super_block *);
2 changes: 1 addition & 1 deletion trunk/fs/autofs4/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static struct file_system_type autofs_fs_type = {
.owner = THIS_MODULE,
.name = "autofs",
.get_sb = autofs_get_sb,
.kill_sb = kill_anon_super,
.kill_sb = autofs4_kill_sb,
};

static int __init init_autofs4_fs(void)
Expand Down
22 changes: 4 additions & 18 deletions trunk/fs/autofs4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void autofs4_free_ino(struct autofs_info *ino)
*/
static void autofs4_force_release(struct autofs_sb_info *sbi)
{
struct dentry *this_parent = sbi->root;
struct dentry *this_parent = sbi->sb->s_root;
struct list_head *next;

spin_lock(&dcache_lock);
Expand Down Expand Up @@ -127,7 +127,7 @@ static void autofs4_force_release(struct autofs_sb_info *sbi)
spin_lock(&dcache_lock);
}

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

next = this_parent->d_u.d_child.next;
Expand All @@ -140,15 +140,9 @@ static void autofs4_force_release(struct autofs_sb_info *sbi)
goto resume;
}
spin_unlock(&dcache_lock);

dput(sbi->root);
sbi->root = NULL;
shrink_dcache_sb(sbi->sb);

return;
}

static void autofs4_put_super(struct super_block *sb)
void autofs4_kill_sb(struct super_block *sb)
{
struct autofs_sb_info *sbi = autofs4_sbi(sb);

Expand All @@ -163,6 +157,7 @@ static void autofs4_put_super(struct super_block *sb)
kfree(sbi);

DPRINTK("shutting down");
kill_anon_super(sb);
}

static int autofs4_show_options(struct seq_file *m, struct vfsmount *mnt)
Expand All @@ -189,7 +184,6 @@ static int autofs4_show_options(struct seq_file *m, struct vfsmount *mnt)
}

static struct super_operations autofs4_sops = {
.put_super = autofs4_put_super,
.statfs = simple_statfs,
.show_options = autofs4_show_options,
};
Expand Down Expand Up @@ -315,7 +309,6 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)

s->s_fs_info = sbi;
sbi->magic = AUTOFS_SBI_MAGIC;
sbi->root = NULL;
sbi->pipefd = -1;
sbi->catatonic = 0;
sbi->exp_timeout = 0;
Expand Down Expand Up @@ -396,13 +389,6 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
sbi->pipe = pipe;
sbi->pipefd = pipefd;

/*
* Take a reference to the root dentry so we get a chance to
* clean up the dentry tree on umount.
* See autofs4_force_release.
*/
sbi->root = dget(root);

/*
* Success! Install the root dentry now to indicate completion.
*/
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/autofs4/waitq.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ void autofs4_catatonic_mode(struct autofs_sb_info *sbi)
fput(sbi->pipe); /* Close the pipe */
sbi->pipe = NULL;
}
shrink_dcache_sb(sbi->sb);
}

static int autofs4_write(struct file *file, const void *addr, int bytes)
Expand Down

0 comments on commit 27b5574

Please sign in to comment.