Subject: [PATCH] fs: cifs: drop unneeded likely() call around IS_ERR()

From: Enrico Weigelt <[email protected]>

IS_ERR() already calls unlikely(), so this extra unlikely() call
around IS_ERR() is not needed.

Signed-off-by: Enrico Weigelt <[email protected]>
---
fs/cifs/dfs_cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
index e3e1c13..1692c0c 100644
--- a/fs/cifs/dfs_cache.c
+++ b/fs/cifs/dfs_cache.c
@@ -492,7 +492,7 @@ static struct dfs_cache_entry *__find_cache_entry(unsigned int hash,
#ifdef CONFIG_CIFS_DEBUG2
char *name = get_tgt_name(ce);

- if (unlikely(IS_ERR(name))) {
+ if (IS_ERR(name)) {
rcu_read_unlock();
return ERR_CAST(name);
}
--
1.9.1


2019-06-05 21:55:03

by Steve French

[permalink] [raw]
Subject: Re: [PATCH] fs: cifs: drop unneeded likely() call around IS_ERR()

This duplicates a patch submitted earlier by Kefeng Wang
<[email protected]> which I plan to merge later today into
cifs-2.6.git for-next

On Wed, Jun 5, 2019 at 4:14 PM Enrico Weigelt, metux IT consult
<[email protected]> wrote:
>
> From: Enrico Weigelt <[email protected]>
>
> IS_ERR() already calls unlikely(), so this extra unlikely() call
> around IS_ERR() is not needed.
>
> Signed-off-by: Enrico Weigelt <[email protected]>
> ---
> fs/cifs/dfs_cache.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
> index e3e1c13..1692c0c 100644
> --- a/fs/cifs/dfs_cache.c
> +++ b/fs/cifs/dfs_cache.c
> @@ -492,7 +492,7 @@ static struct dfs_cache_entry *__find_cache_entry(unsigned int hash,
> #ifdef CONFIG_CIFS_DEBUG2
> char *name = get_tgt_name(ce);
>
> - if (unlikely(IS_ERR(name))) {
> + if (IS_ERR(name)) {
> rcu_read_unlock();
> return ERR_CAST(name);
> }
> --
> 1.9.1
>


--
Thanks,

Steve

Subject: Re: [PATCH] fs: cifs: drop unneeded likely() call around IS_ERR()

On 05.06.19 21:52, Steve French wrote:
> This duplicates a patch submitted earlier by Kefeng Wang
> <[email protected]> which I plan to merge later today into
> cifs-2.6.git for-next

Great :)
Just ignore my patch.


--mtx

--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
[email protected] -- +49-151-27565287