lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 21 Oct 2013 17:00:51 -0200
From:	Geyslan Gregório Bem <geyslan@...il.com>
To:	Eric Van Hensbergen <ericvh@...il.com>
Cc:	rminnich@...dia.gov, Latchesar Ionkov <lucho@...kov.net>,
	V9FS Developers <v9fs-developer@...ts.sourceforge.net>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] 9p: proper use of the 'name' variable

2013/10/21 Geyslan Gregório Bem <geyslan@...il.com>:
> 2013/10/20 Eric Van Hensbergen <ericvh@...il.com>:
>> I reckon we should probably just get rid of name if its not being used.  I
>> doubt the indirection is going to hurt anything here.
>>
>>      -eric
>>
>
> Eric, you're right. Once that there's not assignment to name, the
> cycles are the same.
> I'll get rid of name var.
>

New patch sent.
[PATCH] 9p: remove useless 'name' variable and assignment

>>
>>
>> On Sat, Sep 28, 2013 at 6:32 PM, Geyslan G. Bem <geyslan@...il.com> wrote:
>>>
>>> The 'name' variable was assigned but never used. Hence puts its
>>> assignment to the top and makes proper use of its value.
>>>
>>> Signed-off-by: Geyslan G. Bem <geyslan@...il.com>
>>> ---
>>>  fs/9p/vfs_inode_dotl.c | 8 ++++----
>>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
>>> index 6803758..86b6944 100644
>>> --- a/fs/9p/vfs_inode_dotl.c
>>> +++ b/fs/9p/vfs_inode_dotl.c
>>> @@ -772,8 +772,10 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct
>>> inode *dir,
>>>         struct p9_fid *dfid, *oldfid;
>>>         struct v9fs_session_info *v9ses;
>>>
>>> +       name = (char *) dentry->d_name.name;
>>> +
>>>         p9_debug(P9_DEBUG_VFS, "dir ino: %lu, old_name: %s, new_name:
>>> %s\n",
>>> -                dir->i_ino, old_dentry->d_name.name,
>>> dentry->d_name.name);
>>> +                dir->i_ino, old_dentry->d_name.name, name);
>>>
>>>         v9ses = v9fs_inode2v9ses(dir);
>>>         dir_dentry = dentry->d_parent;
>>> @@ -785,9 +787,7 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct
>>> inode *dir,
>>>         if (IS_ERR(oldfid))
>>>                 return PTR_ERR(oldfid);
>>>
>>> -       name = (char *) dentry->d_name.name;
>>> -
>>> -       err = p9_client_link(dfid, oldfid, (char *)dentry->d_name.name);
>>> +       err = p9_client_link(dfid, oldfid, name);
>>>
>>>         if (err < 0) {
>>>                 p9_debug(P9_DEBUG_VFS, "p9_client_link failed %d\n", err);
>>> --
>>> 1.8.4
>>>
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ