Re: [Cluster-devel] [PATCH] GFS2: Delete an unnecessary check before the function call "iput"

2015-11-16 Thread Bob Peterson
- Original Message -
> From: Markus Elfring 
> Date: Wed, 4 Nov 2015 21:23:43 +0100
> 
> The iput() function tests whether its argument is NULL and then
> returns immediately. Thus the test around the call is not needed.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring 
> ---
>  fs/gfs2/ops_fstype.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
> index baab99b..1f9de17 100644
> --- a/fs/gfs2/ops_fstype.c
> +++ b/fs/gfs2/ops_fstype.c
> @@ -910,8 +910,7 @@ fail_qc_i:
>  fail_ut_i:
>   iput(sdp->sd_sc_inode);
>  fail:
> - if (pn)
> - iput(pn);
> + iput(pn);
>   return error;
>  }
>  
> --
> 2.6.2
> 
> --
Hi,

Thanks. This is now applied to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/cgit/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next=6fde22426be6af261816db5941744b8d3c4c7f96

Regards,

Bob Peterson
Red Hat File Systems



Re: [Cluster-devel] [PATCH] GFS2: Delete an unnecessary check before the function call "iput"

2015-11-13 Thread Bob Peterson
- Original Message -
> From: Markus Elfring 
> Date: Wed, 4 Nov 2015 21:23:43 +0100
> 
> The iput() function tests whether its argument is NULL and then
> returns immediately. Thus the test around the call is not needed.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring 
> ---
>  fs/gfs2/ops_fstype.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
> index baab99b..1f9de17 100644
> --- a/fs/gfs2/ops_fstype.c
> +++ b/fs/gfs2/ops_fstype.c
> @@ -910,8 +910,7 @@ fail_qc_i:
>  fail_ut_i:
>   iput(sdp->sd_sc_inode);
>  fail:
> - if (pn)
> - iput(pn);
> + iput(pn);
>   return error;
>  }
>  
> --
> 2.6.2
> 
> 
Hi Markus,

ACK,

I'll save this patch and push it after the current merge window closed.

Regards,

Bob Peterson
Red Hat File Systems



[Cluster-devel] [PATCH] GFS2: Delete an unnecessary check before the function call "iput"

2015-11-04 Thread SF Markus Elfring
From: Markus Elfring 
Date: Wed, 4 Nov 2015 21:23:43 +0100

The iput() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring 
---
 fs/gfs2/ops_fstype.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index baab99b..1f9de17 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -910,8 +910,7 @@ fail_qc_i:
 fail_ut_i:
iput(sdp->sd_sc_inode);
 fail:
-   if (pn)
-   iput(pn);
+   iput(pn);
return error;
 }
 
-- 
2.6.2