patch-2.1.132 linux/fs/autofs/inode.c
Next file: linux/fs/autofs/root.c
Previous file: linux/fs/affs/namei.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Thu Dec 17 16:51:36 1998
- Orig file:
v2.1.131/linux/fs/autofs/inode.c
- Orig date:
Sun Nov 8 14:03:05 1998
diff -u --recursive --new-file v2.1.131/linux/fs/autofs/inode.c linux/fs/autofs/inode.c
@@ -300,8 +300,11 @@
struct autofs_sb_info *sbi =
(struct autofs_sb_info *) inode->i_sb->u.generic_sbp;
+ /* Initialize to the default case (stub directory) */
+
inode->i_op = NULL;
- inode->i_mode = 0;
+ inode->i_op = &autofs_dir_inode_operations;
+ inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
inode->i_nlink = 2;
inode->i_size = 0;
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
@@ -324,7 +327,7 @@
n = ino - AUTOFS_FIRST_SYMLINK;
if ( n >= AUTOFS_MAX_SYMLINKS || !test_bit(n,sbi->symlink_bitmap)) {
- printk("autofs: Looking for bad symlink inode 0x%08x\n", (unsigned int) ino);
+ printk("autofs: Looking for bad symlink inode %u\n", (unsigned int) ino);
return;
}
@@ -335,10 +338,6 @@
inode->i_mtime = inode->i_ctime = sl->mtime;
inode->i_size = sl->len;
inode->i_nlink = 1;
- } else {
- /* All non-root directory inodes look the same */
- inode->i_op = &autofs_dir_inode_operations;
- inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov