diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-01-25 04:50:43 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-01-26 22:22:26 -0500 |
commit | ef52c75e4b1603f6e6102967ad90118205168eae (patch) | |
tree | abd54af0a688ab20006fa8b51d02a2dd94af4889 /security/inode.c | |
parent | 5998649f779b7148a8a0c10c46cfa99e27d34dfe (diff) |
get rid of pointless checks after simple_pin_fs()
if we'd just got success from it, vfsmount won't be NULL
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/inode.c')
-rw-r--r-- | security/inode.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/security/inode.c b/security/inode.c index f7496c6a022b..c3a793881d04 100644 --- a/security/inode.c +++ b/security/inode.c | |||
@@ -156,15 +156,8 @@ static int create_by_name(const char *name, mode_t mode, | |||
156 | * block. A pointer to that is in the struct vfsmount that we | 156 | * block. A pointer to that is in the struct vfsmount that we |
157 | * have around. | 157 | * have around. |
158 | */ | 158 | */ |
159 | if (!parent ) { | 159 | if (!parent) |
160 | if (mount && mount->mnt_sb) { | 160 | parent = mount->mnt_sb->s_root; |
161 | parent = mount->mnt_sb->s_root; | ||
162 | } | ||
163 | } | ||
164 | if (!parent) { | ||
165 | pr_debug("securityfs: Ah! can not find a parent!\n"); | ||
166 | return -EFAULT; | ||
167 | } | ||
168 | 161 | ||
169 | mutex_lock(&parent->d_inode->i_mutex); | 162 | mutex_lock(&parent->d_inode->i_mutex); |
170 | *dentry = lookup_one_len(name, parent, strlen(name)); | 163 | *dentry = lookup_one_len(name, parent, strlen(name)); |