cifs: Fix return value in __update_cache_entry
diff mbox series

Message ID 20200117022156.57844-1-yuehaibing@huawei.com
State New
Headers show
Series
  • cifs: Fix return value in __update_cache_entry
Related show

Commit Message

YueHaibing Jan. 17, 2020, 2:21 a.m. UTC
copy_ref_data() may return error, it should be
returned to upstream caller.

Fixes: 03535b72873b ("cifs: Avoid doing network I/O while holding cache lock")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/cifs/dfs_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steve French Jan. 17, 2020, 7:53 a.m. UTC | #1
merged into cifs-2.6.git for-next

On Thu, Jan 16, 2020 at 9:58 PM YueHaibing <yuehaibing@huawei.com> wrote:
>
> copy_ref_data() may return error, it should be
> returned to upstream caller.
>
> Fixes: 03535b72873b ("cifs: Avoid doing network I/O while holding cache lock")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  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 5617efe..03cfaa1 100644
> --- a/fs/cifs/dfs_cache.c
> +++ b/fs/cifs/dfs_cache.c
> @@ -593,7 +593,7 @@ static int __update_cache_entry(const char *path,
>
>         kfree(th);
>
> -       return 0;
> +       return rc;
>  }
>
>  static int get_dfs_referral(const unsigned int xid, struct cifs_ses *ses,
> --
> 2.7.4
>
>

Patch
diff mbox series

diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
index 5617efe..03cfaa1 100644
--- a/fs/cifs/dfs_cache.c
+++ b/fs/cifs/dfs_cache.c
@@ -593,7 +593,7 @@  static int __update_cache_entry(const char *path,
 
 	kfree(th);
 
-	return 0;
+	return rc;
 }
 
 static int get_dfs_referral(const unsigned int xid, struct cifs_ses *ses,