From 0efaf703eb265be9483eecbe18a11af2363ae7c4 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 16 Jan 2011 17:39:15 -0500 Subject: [PATCH] --- yaml --- r: 231788 b: refs/heads/master c: 0bf71d4d005176f6b6587ba64a377f9798213f21 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/autofs4/autofs_i.h | 2 -- trunk/fs/autofs4/inode.c | 2 -- trunk/fs/autofs4/root.c | 5 +++-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 760f03497dfc..34c7c134ab5f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 09f12c03fa699ce7d030c47add60577138927d4f +refs/heads/master: 0bf71d4d005176f6b6587ba64a377f9798213f21 diff --git a/trunk/fs/autofs4/autofs_i.h b/trunk/fs/autofs4/autofs_i.h index c6d66db67ff1..0925bacb5c3c 100644 --- a/trunk/fs/autofs4/autofs_i.h +++ b/trunk/fs/autofs4/autofs_i.h @@ -88,8 +88,6 @@ struct autofs_info { uid_t uid; gid_t gid; - - size_t size; }; #define AUTOFS_INF_EXPIRING (1<<0) /* dentry is in the process of expiring */ diff --git a/trunk/fs/autofs4/inode.c b/trunk/fs/autofs4/inode.c index 6b6f43f00c46..ac1a99ce820b 100644 --- a/trunk/fs/autofs4/inode.c +++ b/trunk/fs/autofs4/inode.c @@ -38,7 +38,6 @@ struct autofs_info *autofs4_init_ino(struct autofs_info *ino, if (!reinit) { ino->flags = 0; ino->dentry = NULL; - ino->size = 0; INIT_LIST_HEAD(&ino->active); ino->active_count = 0; INIT_LIST_HEAD(&ino->expiring); @@ -365,7 +364,6 @@ struct inode *autofs4_get_inode(struct super_block *sb, inode->i_op = &autofs4_dir_inode_operations; inode->i_fop = &autofs4_dir_operations; } else if (S_ISLNK(mode)) { - inode->i_size = inf->size; inode->i_op = &autofs4_symlink_inode_operations; } diff --git a/trunk/fs/autofs4/root.c b/trunk/fs/autofs4/root.c index e55dcdbeb450..1ad3c6ca9b03 100644 --- a/trunk/fs/autofs4/root.c +++ b/trunk/fs/autofs4/root.c @@ -530,6 +530,7 @@ static int autofs4_dir_symlink(struct inode *dir, struct autofs_info *ino = autofs4_dentry_ino(dentry); struct autofs_info *p_ino; struct inode *inode; + size_t size = strlen(symname); char *cp; DPRINTK("%s <- %.*s", symname, @@ -544,8 +545,7 @@ static int autofs4_dir_symlink(struct inode *dir, autofs4_del_active(dentry); - ino->size = strlen(symname); - cp = kmalloc(ino->size + 1, GFP_KERNEL); + cp = kmalloc(size + 1, GFP_KERNEL); if (!cp) { if (!dentry->d_fsdata) kfree(ino); @@ -562,6 +562,7 @@ static int autofs4_dir_symlink(struct inode *dir, return -ENOMEM; } inode->i_private = cp; + inode->i_size = size; d_add(dentry, inode); dentry->d_fsdata = ino;