Patchwork ext4: drop unsed reclen variable from ext4_add_dirent_to_inline()

login
register
mail settings
Submitter Azat Khuzhin
Date Sept. 18, 2013, 8:17 p.m.
Message ID <1379535450-31253-1-git-send-email-a3at.mail@gmail.com>
Download mbox | patch
Permalink /patch/275812/
State Accepted
Headers show

Comments

Azat Khuzhin - Sept. 18, 2013, 8:17 p.m.
Functions that need in it, already calculate reclen from namelen by
themselves:
- ext4_find_dest_de()
- ext4_insert_dentry()

Signed-off-by: Azat Khuzhin <a3at.mail@gmail.com>
---
 fs/ext4/inline.c | 2 --
 1 file changed, 2 deletions(-)
Theodore Ts'o - Oct. 30, 2013, 2:55 p.m.
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 <a3at.mail@gmail.com>

Applied, thanks.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Azat Khuzhin - Oct. 30, 2013, 5:02 p.m.
On Wed, Oct 30, 2013 at 6:55 PM, Theodore Ts'o <tytso@mit.edu> 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 <a3at.mail@gmail.com>
>
> 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
Theodore Ts'o - Oct. 30, 2013, 6:29 p.m.
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 <a3at.mail@gmail.com>
    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Cheers,

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

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);