From: YueHaibing <yuehaibing@huawei.com>
To: <stfrench@microsoft.com>, <pc@cjr.nz>
Cc: <linux-cifs@vger.kernel.org>, <samba-technical@lists.samba.org>,
<linux-kernel@vger.kernel.org>,
YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH] cifs: Fix return value in __update_cache_entry
Date: Fri, 17 Jan 2020 10:21:56 +0800 [thread overview]
Message-ID: <20200117022156.57844-1-yuehaibing@huawei.com> (raw)
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
next reply other threads:[~2020-01-17 2:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 2:21 YueHaibing [this message]
2020-01-17 7:53 ` [PATCH] cifs: Fix return value in __update_cache_entry Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200117022156.57844-1-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pc@cjr.nz \
--cc=samba-technical@lists.samba.org \
--cc=stfrench@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).