autofs4: kill ->size in autofs_info

It's used only to pass the length of symlink body to
autofs4_get_inode() in autofs4_dir_symlink(). We can
bloody well set inode->i_size in autofs4_dir_symlink()
directly and be done with that.

Acked-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 0bf71d4d 09f12c03

+3 -6
-2
fs/autofs4/autofs_i.h
··· 88 89 uid_t uid; 90 gid_t gid; 91 - 92 - size_t size; 93 }; 94 95 #define AUTOFS_INF_EXPIRING (1<<0) /* dentry is in the process of expiring */
··· 88 89 uid_t uid; 90 gid_t gid; 91 }; 92 93 #define AUTOFS_INF_EXPIRING (1<<0) /* dentry is in the process of expiring */
-2
fs/autofs4/inode.c
··· 38 if (!reinit) { 39 ino->flags = 0; 40 ino->dentry = NULL; 41 - ino->size = 0; 42 INIT_LIST_HEAD(&ino->active); 43 ino->active_count = 0; 44 INIT_LIST_HEAD(&ino->expiring); ··· 364 inode->i_op = &autofs4_dir_inode_operations; 365 inode->i_fop = &autofs4_dir_operations; 366 } else if (S_ISLNK(mode)) { 367 - inode->i_size = inf->size; 368 inode->i_op = &autofs4_symlink_inode_operations; 369 } 370
··· 38 if (!reinit) { 39 ino->flags = 0; 40 ino->dentry = NULL; 41 INIT_LIST_HEAD(&ino->active); 42 ino->active_count = 0; 43 INIT_LIST_HEAD(&ino->expiring); ··· 365 inode->i_op = &autofs4_dir_inode_operations; 366 inode->i_fop = &autofs4_dir_operations; 367 } else if (S_ISLNK(mode)) { 368 inode->i_op = &autofs4_symlink_inode_operations; 369 } 370
+3 -2
fs/autofs4/root.c
··· 530 struct autofs_info *ino = autofs4_dentry_ino(dentry); 531 struct autofs_info *p_ino; 532 struct inode *inode; 533 char *cp; 534 535 DPRINTK("%s <- %.*s", symname, ··· 545 546 autofs4_del_active(dentry); 547 548 - ino->size = strlen(symname); 549 - cp = kmalloc(ino->size + 1, GFP_KERNEL); 550 if (!cp) { 551 if (!dentry->d_fsdata) 552 kfree(ino); ··· 562 return -ENOMEM; 563 } 564 inode->i_private = cp; 565 d_add(dentry, inode); 566 567 dentry->d_fsdata = ino;
··· 530 struct autofs_info *ino = autofs4_dentry_ino(dentry); 531 struct autofs_info *p_ino; 532 struct inode *inode; 533 + size_t size = strlen(symname); 534 char *cp; 535 536 DPRINTK("%s <- %.*s", symname, ··· 544 545 autofs4_del_active(dentry); 546 547 + cp = kmalloc(size + 1, GFP_KERNEL); 548 if (!cp) { 549 if (!dentry->d_fsdata) 550 kfree(ino); ··· 562 return -ENOMEM; 563 } 564 inode->i_private = cp; 565 + inode->i_size = size; 566 d_add(dentry, inode); 567 568 dentry->d_fsdata = ino;