patch-2.1.48 linux/fs/autofs/inode.c

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

diff -u --recursive --new-file v2.1.47/linux/fs/autofs/inode.c linux/fs/autofs/inode.c
@@ -172,27 +172,27 @@
 	unlock_super(s);
 	s->s_root = d_alloc_root(iget(s, AUTOFS_ROOT_INO), NULL);
 	if (!s->s_root) {
-		s->s_dev = 0;
-		kfree(sbi);
 		printk("autofs: get root inode failed\n");
+		kfree(sbi);
+		s->s_dev = 0;
 		MOD_DEC_USE_COUNT;
 		return NULL;
 	}
 
 	if ( parse_options(data,&pipefd,&s->s_root->d_inode->i_uid,&s->s_root->d_inode->i_gid,&sbi->oz_pgrp,&minproto,&maxproto) ) {
+		printk("autofs: called with bogus options\n");
 		dput(s->s_root);
-		s->s_dev = 0;
 		kfree(sbi);
-		printk("autofs: called with bogus options\n");
+		s->s_dev = 0;
 		MOD_DEC_USE_COUNT;
 		return NULL;
 	}
 
 	if ( minproto > AUTOFS_PROTO_VERSION || maxproto < AUTOFS_PROTO_VERSION ) {
+		printk("autofs: kernel does not match daemon version\n");
 		dput(s->s_root);
-		s->s_dev = 0;
 		kfree(sbi);
-		printk("autofs: kernel does not match daemon version\n");
+		s->s_dev = 0;
 		MOD_DEC_USE_COUNT;
 		return NULL;
 	}
@@ -207,8 +207,8 @@
 			printk("autofs: could not open pipe file descriptor\n");
 		}
 		dput(s->s_root);
-		s->s_dev = 0;
 		kfree(sbi);
+		s->s_dev = 0;
 		MOD_DEC_USE_COUNT;
 		return NULL;
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov