patch-2.3.99-pre6 linux/fs/autofs/inode.c

Next file: linux/fs/autofs/root.c
Previous file: linux/fs/autofs/dirhash.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre5/linux/fs/autofs/inode.c linux/fs/autofs/inode.c
@@ -19,19 +19,6 @@
 #define __NO_VERSION__
 #include <linux/module.h>
 
-/*
- * Dummy functions - do we ever actually want to do
- * something here?
- */
-static void autofs_put_inode(struct inode *inode)
-{
-}
-
-static void autofs_delete_inode(struct inode *inode)
-{
-	inode->i_size = 0;
-}
-
 static void autofs_put_super(struct super_block *sb)
 {
 	struct autofs_sb_info *sbi = autofs_sbi(sb);
@@ -53,13 +40,9 @@
 
 static int autofs_statfs(struct super_block *sb, struct statfs *buf);
 static void autofs_read_inode(struct inode *inode);
-static void autofs_write_inode(struct inode *inode);
 
 static struct super_operations autofs_sops = {
 	read_inode:	autofs_read_inode,
-	write_inode:	autofs_write_inode,
-	put_inode:	autofs_put_inode,
-	delete_inode:	autofs_delete_inode,
 	put_super:	autofs_put_super,
 	statfs:		autofs_statfs,
 };
@@ -137,10 +120,6 @@
 	struct autofs_sb_info *sbi;
 	int minproto, maxproto;
 
-	/* Super block already completed? */
-	if (s->s_root)
-		goto out_unlock;
-
 	sbi = (struct autofs_sb_info *) kmalloc(sizeof(struct autofs_sb_info), GFP_KERNEL);
 	if ( !sbi )
 		goto fail_unlock;
@@ -159,25 +138,15 @@
 	s->s_blocksize_bits = 10;
 	s->s_magic = AUTOFS_SUPER_MAGIC;
 	s->s_op = &autofs_sops;
-	s->s_root = NULL;
 
-	/*
-	 * Get the root inode and dentry, but defer checking for errors.
-	 */
 	root_inode = iget(s, AUTOFS_ROOT_INO);
 	root = d_alloc_root(root_inode);
 	pipe = NULL;
 
-	/*
-	 * Check whether somebody else completed the super block.
-	 */
-	if (s->s_root)
-		goto out_dput;
-
 	if (!root)
 		goto fail_iput;
 
-	/* Can this call block? */
+	/* Can this call block?  - WTF cares? s is locked. */
 	if ( parse_options(data,&pipefd,&root_inode->i_uid,&root_inode->i_gid,&sbi->oz_pgrp,&minproto,&maxproto) ) {
 		printk("autofs: called with bogus options\n");
 		goto fail_dput;
@@ -192,11 +161,6 @@
 
 	DPRINTK(("autofs: pipe fd = %d, pgrp = %u\n", pipefd, sbi->oz_pgrp));
 	pipe = fget(pipefd);
-	/*
-	 * Check whether somebody else completed the super block.
-	 */
-	if (s->s_root)
-		goto out_fput;
 	
 	if ( !pipe ) {
 		printk("autofs: could not open pipe file descriptor\n");
@@ -212,43 +176,14 @@
 	s->s_root = root;
 	return s;
 
-	/*
-	 * Success ... somebody else completed the super block for us. 
-	 */ 
-out_unlock:
-	goto out_dec;
-out_fput:
-	if (pipe)
-		fput(pipe);
-out_dput:
-	if (root)
-		dput(root);
-	else
-		iput(root_inode);
-out_dec:
-	return s;
-	
-	/*
-	 * Failure ... clear the s_dev slot and clean up.
-	 */
 fail_fput:
 	printk("autofs: pipe file descriptor does not contain proper ops\n");
-	/*
-	 * fput() can block, so we clear the super block first.
-	 */
 	fput(pipe);
-	/* fall through */
 fail_dput:
-	/*
-	 * dput() can block, so we clear the super block first.
-	 */
 	dput(root);
 	goto fail_free;
 fail_iput:
 	printk("autofs: get root dentry failed\n");
-	/*
-	 * iput() can block, so we clear the super block first.
-	 */
 	iput(root_inode);
 fail_free:
 	kfree(sbi);
@@ -260,9 +195,6 @@
 {
 	buf->f_type = AUTOFS_SUPER_MAGIC;
 	buf->f_bsize = 1024;
-	buf->f_bfree = 0;
-	buf->f_bavail = 0;
-	buf->f_ffree = 0;
 	buf->f_namelen = NAME_MAX;
 	return 0;
 }
@@ -313,8 +245,4 @@
 		inode->i_size = sl->len;
 		inode->i_nlink = 1;
 	}
-}
-
-static void autofs_write_inode(struct inode *inode)
-{
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)