* [PATCH] ocfs2: remove an unnecessary condition
@ 2021-07-08 14:16 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-07-08 14:16 UTC (permalink / raw)
To: Mark Fasheh, Larry Chen
Cc: Joel Becker, Joseph Qi, ocfs2-devel, kernel-janitors
The case where "tmp_oh" is NULL is handled at the start of the function.
At this point we know it's non-NULL so this will always return 1.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
fs/ocfs2/dlmglue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 48fd369c29a4..33fbdc823278 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -2721,7 +2721,7 @@ int ocfs2_inode_lock_tracker(struct inode *inode,
return status;
}
}
- return tmp_oh ? 1 : 0;
+ return 1;
}
void ocfs2_inode_unlock_tracker(struct inode *inode,
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2: remove an unnecessary condition
@ 2021-07-08 14:16 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2021-07-08 14:16 UTC (permalink / raw)
To: Mark Fasheh, Larry Chen; +Cc: kernel-janitors, ocfs2-devel
The case where "tmp_oh" is NULL is handled at the start of the function.
At this point we know it's non-NULL so this will always return 1.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
fs/ocfs2/dlmglue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 48fd369c29a4..33fbdc823278 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -2721,7 +2721,7 @@ int ocfs2_inode_lock_tracker(struct inode *inode,
return status;
}
}
- return tmp_oh ? 1 : 0;
+ return 1;
}
void ocfs2_inode_unlock_tracker(struct inode *inode,
--
2.30.2
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ocfs2: remove an unnecessary condition
2021-07-08 14:16 ` [Ocfs2-devel] " Dan Carpenter
@ 2021-07-12 1:46 ` Joseph Qi
-1 siblings, 0 replies; 4+ messages in thread
From: Joseph Qi @ 2021-07-12 1:46 UTC (permalink / raw)
To: Dan Carpenter, Mark Fasheh, Larry Chen, akpm
Cc: Joel Becker, ocfs2-devel, kernel-janitors
On 7/8/21 10:16 PM, Dan Carpenter wrote:
> The case where "tmp_oh" is NULL is handled at the start of the function.
> At this point we know it's non-NULL so this will always return 1.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/dlmglue.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
> index 48fd369c29a4..33fbdc823278 100644
> --- a/fs/ocfs2/dlmglue.c
> +++ b/fs/ocfs2/dlmglue.c
> @@ -2721,7 +2721,7 @@ int ocfs2_inode_lock_tracker(struct inode *inode,
> return status;
> }
> }
> - return tmp_oh ? 1 : 0;
> + return 1;
> }
>
> void ocfs2_inode_unlock_tracker(struct inode *inode,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Ocfs2-devel] [PATCH] ocfs2: remove an unnecessary condition
@ 2021-07-12 1:46 ` Joseph Qi
0 siblings, 0 replies; 4+ messages in thread
From: Joseph Qi @ 2021-07-12 1:46 UTC (permalink / raw)
To: Dan Carpenter, Mark Fasheh, Larry Chen, akpm; +Cc: kernel-janitors, ocfs2-devel
On 7/8/21 10:16 PM, Dan Carpenter wrote:
> The case where "tmp_oh" is NULL is handled at the start of the function.
> At this point we know it's non-NULL so this will always return 1.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/dlmglue.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
> index 48fd369c29a4..33fbdc823278 100644
> --- a/fs/ocfs2/dlmglue.c
> +++ b/fs/ocfs2/dlmglue.c
> @@ -2721,7 +2721,7 @@ int ocfs2_inode_lock_tracker(struct inode *inode,
> return status;
> }
> }
> - return tmp_oh ? 1 : 0;
> + return 1;
> }
>
> void ocfs2_inode_unlock_tracker(struct inode *inode,
>
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-12 1:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 14:16 [PATCH] ocfs2: remove an unnecessary condition Dan Carpenter
2021-07-08 14:16 ` [Ocfs2-devel] " Dan Carpenter
2021-07-12 1:46 ` Joseph Qi
2021-07-12 1:46 ` [Ocfs2-devel] " Joseph Qi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.