2013-09-18 20:18:13

by Azat Khuzhin

[permalink] [raw]
Subject: [PATCH] ext4: drop unsed reclen variable from ext4_add_dirent_to_inline()

Functions that need in it, already calculate reclen from namelen by
themselves:
- ext4_find_dest_de()
- ext4_insert_dentry()

Signed-off-by: Azat Khuzhin <[email protected]>
---
fs/ext4/inline.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index d9ecbf1..809f285 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -994,11 +994,9 @@ static int ext4_add_dirent_to_inline(handle_t *handle,
struct inode *dir = dentry->d_parent->d_inode;
const char *name = dentry->d_name.name;
int namelen = dentry->d_name.len;
- unsigned short reclen;
int err;
struct ext4_dir_entry_2 *de;

- reclen = EXT4_DIR_REC_LEN(namelen);
err = ext4_find_dest_de(dir, inode, iloc->bh,
inline_start, inline_size,
name, namelen, &de);
--
1.8.4.rc3


2013-10-30 16:51:05

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] ext4: drop unsed reclen variable from ext4_add_dirent_to_inline()

On Thu, Sep 19, 2013 at 12:17:30AM +0400, Azat Khuzhin wrote:
> Functions that need in it, already calculate reclen from namelen by
> themselves:
> - ext4_find_dest_de()
> - ext4_insert_dentry()
>
> Signed-off-by: Azat Khuzhin <[email protected]>

Applied, thanks.

- Ted

2013-10-30 17:02:38

by Azat Khuzhin

[permalink] [raw]
Subject: Re: [PATCH] ext4: drop unsed reclen variable from ext4_add_dirent_to_inline()

On Wed, Oct 30, 2013 at 6:55 PM, Theodore Ts'o <[email protected]> wrote:
> On Thu, Sep 19, 2013 at 12:17:30AM +0400, Azat Khuzhin wrote:
>> Functions that need in it, already calculate reclen from namelen by
>> themselves:
>> - ext4_find_dest_de()
>> - ext4_insert_dentry()
>>
>> Signed-off-by: Azat Khuzhin <[email protected]>
>
> Applied, thanks.

Thank you!
But there is a typo in subject, s/unsed/unused/ could you fix or it,
or tell me, and I will resend it?

Thanks!

>
> - Ted



--
Respectfully
Azat Khuzhin

2013-10-30 18:29:11

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] ext4: drop unsed reclen variable from ext4_add_dirent_to_inline()

On Wed, Oct 30, 2013 at 09:02:35PM +0400, Azat Khuzhin wrote:
>
> Thank you!
> But there is a typo in subject, s/unsed/unused/ could you fix or it,
> or tell me, and I will resend it?

I had already reworeded the commit description as follows:

ext4: drop set but otherwise unused variable from ext4_add_dirent_to_inline()

Signed-off-by: Azat Khuzhin <[email protected]>
Signed-off-by: "Theodore Ts'o" <[email protected]>

Cheers,

- Ted