From 4515746ea214d57c6aa7da0bab75d80f3011b823 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 13 Jan 2019 19:41:42 +0000 Subject: [PATCH] scst_dlm: Fix scst_read_file() The 'fs' register must be set before vfs_read() is called. kernel_read() does this but scst_read() not. Hence change the scst_read() call in the dlm code into a kernel_read() call. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7872 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_dlm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/scst_dlm.c b/scst/src/scst_dlm.c index ad65c46f9..7e60e014c 100644 --- a/scst/src/scst_dlm.c +++ b/scst/src/scst_dlm.c @@ -516,7 +516,7 @@ static int scst_read_file(const char *path, char *buf, int buf_len) goto out; } pos = 0; - ret = scst_read(f, buf, buf_len, &pos); + ret = kernel_read(f, buf, buf_len, &pos); if (ret >= 0) buf[min(ret, buf_len - 1)] = '\0'; filp_close(f, NULL);