Patchwork [2/4] ext4: remove unused variable in add_dirent_to_buf()

login
register
mail settings
Submitter Guo Chao
Date Jan. 18, 2013, 8:01 a.m.
Message ID <1358496074-6228-2-git-send-email-yan@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/213517/
State Accepted
Headers show

Comments

Guo Chao - Jan. 18, 2013, 8:01 a.m.
After commit 978fef9 (create __ext4_insert_dentry for dir entry
insertion), 'reclen' is not used anymore.

Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
---
 fs/ext4/namei.c |    2 --
 1 file changed, 2 deletions(-)
Darrick J. Wong - Jan. 29, 2013, 1:12 a.m.
On Fri, Jan 18, 2013 at 04:01:12PM +0800, Guo Chao wrote:
> After commit 978fef9 (create __ext4_insert_dentry for dir entry
> insertion), 'reclen' is not used anymore.
> 
> Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
This one looks ok too.
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  fs/ext4/namei.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
> index a445247..b3717a3 100644
> --- a/fs/ext4/namei.c
> +++ b/fs/ext4/namei.c
> @@ -1703,7 +1703,6 @@ static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry,
>  	const char	*name = dentry->d_name.name;
>  	int		namelen = dentry->d_name.len;
>  	unsigned int	blocksize = dir->i_sb->s_blocksize;
> -	unsigned short	reclen;
>  	int		csum_size = 0;
>  	int		err;
>  
> @@ -1711,7 +1710,6 @@ static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry,
>  				       EXT4_FEATURE_RO_COMPAT_METADATA_CSUM))
>  		csum_size = sizeof(struct ext4_dir_entry_tail);
>  
> -	reclen = EXT4_DIR_REC_LEN(namelen);
>  	if (!de) {
>  		err = ext4_find_dest_de(dir, inode,
>  					bh, bh->b_data, blocksize - csum_size,
> -- 
> 1.7.9.5
> 
> --
> 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
--
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
Theodore Ts'o - Jan. 29, 2013, 2:28 a.m.
On Mon, Jan 28, 2013 at 05:12:18PM -0800, Darrick J. Wong wrote:
> On Fri, Jan 18, 2013 at 04:01:12PM +0800, Guo Chao wrote:
> > After commit 978fef9 (create __ext4_insert_dentry for dir entry
> > insertion), 'reclen' is not used anymore.
> > 
> > Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
> This one looks ok too.
> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

Thanks, applied.

					- 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/namei.c b/fs/ext4/namei.c
index a445247..b3717a3 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1703,7 +1703,6 @@  static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry,
 	const char	*name = dentry->d_name.name;
 	int		namelen = dentry->d_name.len;
 	unsigned int	blocksize = dir->i_sb->s_blocksize;
-	unsigned short	reclen;
 	int		csum_size = 0;
 	int		err;
 
@@ -1711,7 +1710,6 @@  static int add_dirent_to_buf(handle_t *handle, struct dentry *dentry,
 				       EXT4_FEATURE_RO_COMPAT_METADATA_CSUM))
 		csum_size = sizeof(struct ext4_dir_entry_tail);
 
-	reclen = EXT4_DIR_REC_LEN(namelen);
 	if (!de) {
 		err = ext4_find_dest_de(dir, inode,
 					bh, bh->b_data, blocksize - csum_size,