From 383393c6b5e6f949d504e717f2956cb6f7776f9d Mon Sep 17 00:00:00 2001 From: blue Date: Thu, 18 May 2023 11:54:03 +0000 Subject: [PATCH] =?UTF-8?q?update=20qtfs/qtfs=5Fserver/fsops.c.=20?= =?UTF-8?q?=E4=B8=BAg=5Fwhitelist=E7=9A=84=E4=BD=BF=E7=94=A8=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=94=81=E4=BF=9D=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: blue --- qtfs/qtfs_server/fsops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qtfs/qtfs_server/fsops.c b/qtfs/qtfs_server/fsops.c index c1705d6..32624e8 100644 --- a/qtfs/qtfs_server/fsops.c +++ b/qtfs/qtfs_server/fsops.c @@ -49,7 +49,9 @@ bool in_white_list(char *path, int type) { int i, in_wl = -1; + read_lock(&g_whitelist_lock); if (!g_whitelist[type]) { + read_unlock(&g_whitelist_lock); return true; } for (i = 0; i < g_whitelist[type]->len; i++) { @@ -58,6 +60,7 @@ bool in_white_list(char *path, int type) break; } } + read_unlock(&g_whitelist_lock); return in_wl != -1; } -- Gitee