kfree(sbi);
- DPRINTK(("autofs: shutting down\n"));
+ DPRINTK("shutting down");
}
static struct super_operations autofs4_sops = {
struct file * pipe;
int pipefd;
struct autofs_sb_info *sbi;
+ struct autofs_info *ino;
int minproto, maxproto;
sbi = (struct autofs_sb_info *) kmalloc(sizeof(*sbi), GFP_KERNEL);
if ( !sbi )
goto fail_unlock;
- DPRINTK(("autofs: starting up, sbi = %p\n",sbi));
+ DPRINTK("starting up, sbi = %p",sbi);
memset(sbi, 0, sizeof(*sbi));
sbi->oz_pgrp = process_group(current);
sbi->sb = s;
sbi->version = 0;
+ sbi->sub_version = 0;
+ init_MUTEX(&sbi->wq_sem);
sbi->queues = NULL;
s->s_blocksize = 1024;
s->s_blocksize_bits = 10;
/*
* Get the root inode and dentry, but defer checking for errors.
*/
- root_inode = autofs4_get_inode(s, autofs4_mkroot(sbi));
+ ino = autofs4_mkroot(sbi);
+ if (!ino)
+ goto fail_free;
+ root_inode = autofs4_get_inode(s, ino);
+ kfree(ino);
if (!root_inode)
goto fail_free;
}
sbi->version = maxproto > AUTOFS_MAX_PROTO_VERSION ? AUTOFS_MAX_PROTO_VERSION : maxproto;
+ sbi->sub_version = AUTOFS_PROTO_SUBVERSION;
- DPRINTK(("autofs: pipe fd = %d, pgrp = %u\n", pipefd, sbi->oz_pgrp));
+ DPRINTK("pipe fd = %d, pgrp = %u", pipefd, sbi->oz_pgrp);
pipe = fget(pipefd);
if ( !pipe ) {
if (S_ISDIR(inf->mode)) {
inode->i_nlink = 2;
inode->i_op = &autofs4_dir_inode_operations;
- inode->i_fop = &simple_dir_operations;
+ inode->i_fop = &autofs4_dir_operations;
} else if (S_ISLNK(inf->mode)) {
inode->i_size = inf->size;
inode->i_op = &autofs4_symlink_inode_operations;