diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-09-27 18:16:47 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-09-27 18:16:47 -0400 |
| commit | 3b9f6cb8a1ec791be79c6c7595fea922f12d1e64 (patch) | |
| tree | 2393a448add846e6c2ed12f68106c3018b72c6a9 /fs/autofs | |
| parent | c38778c3a9aeadcd1ee319cfc8ea5a9cbf8cdafa (diff) | |
| parent | a77c64c1a641950626181b4857abb701d8f38ccc (diff) | |
Merge branch 'master' into upstream
Diffstat (limited to 'fs/autofs')
| -rw-r--r-- | fs/autofs/inode.c | 6 | ||||
| -rw-r--r-- | fs/autofs/symlink.c | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c index af2efbbb5d76..2c9759baad61 100644 --- a/fs/autofs/inode.c +++ b/fs/autofs/inode.c | |||
| @@ -129,10 +129,9 @@ int autofs_fill_super(struct super_block *s, void *data, int silent) | |||
| 129 | struct autofs_sb_info *sbi; | 129 | struct autofs_sb_info *sbi; |
| 130 | int minproto, maxproto; | 130 | int minproto, maxproto; |
| 131 | 131 | ||
| 132 | sbi = kmalloc(sizeof(*sbi), GFP_KERNEL); | 132 | sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); |
| 133 | if ( !sbi ) | 133 | if ( !sbi ) |
| 134 | goto fail_unlock; | 134 | goto fail_unlock; |
| 135 | memset(sbi, 0, sizeof(*sbi)); | ||
| 136 | DPRINTK(("autofs: starting up, sbi = %p\n",sbi)); | 135 | DPRINTK(("autofs: starting up, sbi = %p\n",sbi)); |
| 137 | 136 | ||
| 138 | s->s_fs_info = sbi; | 137 | s->s_fs_info = sbi; |
| @@ -217,7 +216,6 @@ static void autofs_read_inode(struct inode *inode) | |||
| 217 | inode->i_nlink = 2; | 216 | inode->i_nlink = 2; |
| 218 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; | 217 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
| 219 | inode->i_blocks = 0; | 218 | inode->i_blocks = 0; |
| 220 | inode->i_blksize = 1024; | ||
| 221 | 219 | ||
| 222 | if ( ino == AUTOFS_ROOT_INO ) { | 220 | if ( ino == AUTOFS_ROOT_INO ) { |
| 223 | inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; | 221 | inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; |
| @@ -242,7 +240,7 @@ static void autofs_read_inode(struct inode *inode) | |||
| 242 | 240 | ||
| 243 | inode->i_op = &autofs_symlink_inode_operations; | 241 | inode->i_op = &autofs_symlink_inode_operations; |
| 244 | sl = &sbi->symlink[n]; | 242 | sl = &sbi->symlink[n]; |
| 245 | inode->u.generic_ip = sl; | 243 | inode->i_private = sl; |
| 246 | inode->i_mode = S_IFLNK | S_IRWXUGO; | 244 | inode->i_mode = S_IFLNK | S_IRWXUGO; |
| 247 | 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; |
| 248 | inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec = 0; | 246 | inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec = 0; |
diff --git a/fs/autofs/symlink.c b/fs/autofs/symlink.c index 52e8772b066e..c74f2eb65775 100644 --- a/fs/autofs/symlink.c +++ b/fs/autofs/symlink.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | /* Nothing to release.. */ | 15 | /* Nothing to release.. */ |
| 16 | static void *autofs_follow_link(struct dentry *dentry, struct nameidata *nd) | 16 | static void *autofs_follow_link(struct dentry *dentry, struct nameidata *nd) |
| 17 | { | 17 | { |
| 18 | char *s=((struct autofs_symlink *)dentry->d_inode->u.generic_ip)->data; | 18 | char *s=((struct autofs_symlink *)dentry->d_inode->i_private)->data; |
| 19 | nd_set_link(nd, s); | 19 | nd_set_link(nd, s); |
| 20 | return NULL; | 20 | return NULL; |
| 21 | } | 21 | } |
