Blob Blame History Raw
From: YueHaibing <yuehaibing@huawei.com>
Date: Fri, 17 Jan 2020 10:21:56 +0800
Subject: [PATCH] cifs: Fix return value in __update_cache_entry
Git-commit: eecfc57130b5faa11fa5fe556313254c7ecfabed
References: bsc#1144333
Patch-mainline: v5.6-rc1

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>
Signed-off-by: Steve French <stfrench@microsoft.com>
Acked-by: Paulo Alcantara <palcantara@suse.de>
---
 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 76ffe12d64f5..2bbfe283fb52 100644
--- a/fs/cifs/dfs_cache.c
+++ b/fs/cifs/dfs_cache.c
@@ -592,7 +592,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.25.1