aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs/inode.c')
-rw-r--r--fs/autofs/inode.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c
index 65e5ed42190e..2c9759baad61 100644
--- a/fs/autofs/inode.c
+++ b/fs/autofs/inode.c
@@ -16,6 +16,7 @@
16#include <linux/file.h> 16#include <linux/file.h>
17#include <linux/parser.h> 17#include <linux/parser.h>
18#include <linux/bitops.h> 18#include <linux/bitops.h>
19#include <linux/magic.h>
19#include "autofs_i.h" 20#include "autofs_i.h"
20#include <linux/module.h> 21#include <linux/module.h>
21 22
@@ -128,10 +129,9 @@ int autofs_fill_super(struct super_block *s, void *data, int silent)
128 struct autofs_sb_info *sbi; 129 struct autofs_sb_info *sbi;
129 int minproto, maxproto; 130 int minproto, maxproto;
130 131
131 sbi = kmalloc(sizeof(*sbi), GFP_KERNEL); 132 sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
132 if ( !sbi ) 133 if ( !sbi )
133 goto fail_unlock; 134 goto fail_unlock;
134 memset(sbi, 0, sizeof(*sbi));
135 DPRINTK(("autofs: starting up, sbi = %p\n",sbi)); 135 DPRINTK(("autofs: starting up, sbi = %p\n",sbi));
136 136
137 s->s_fs_info = sbi; 137 s->s_fs_info = sbi;
@@ -216,7 +216,6 @@ static void autofs_read_inode(struct inode *inode)
216 inode->i_nlink = 2; 216 inode->i_nlink = 2;
217 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 217 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
218 inode->i_blocks = 0; 218 inode->i_blocks = 0;
219 inode->i_blksize = 1024;
220 219
221 if ( ino == AUTOFS_ROOT_INO ) { 220 if ( ino == AUTOFS_ROOT_INO ) {
222 inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; 221 inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
@@ -241,7 +240,7 @@ static void autofs_read_inode(struct inode *inode)
241 240
242 inode->i_op = &autofs_symlink_inode_operations; 241 inode->i_op = &autofs_symlink_inode_operations;
243 sl = &sbi->symlink[n]; 242 sl = &sbi->symlink[n];
244 inode->u.generic_ip = sl; 243 inode->i_private = sl;
245 inode->i_mode = S_IFLNK | S_IRWXUGO; 244 inode->i_mode = S_IFLNK | S_IRWXUGO;
246 inode->i_mtime.tv_sec = inode->i_ctime.tv_sec = sl->mtime; 245 inode->i_mtime.tv_sec = inode->i_ctime.tv_sec = sl->mtime;
247 inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec = 0; 246 inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec = 0;