aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/dir.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2023-08-01 14:09:48 -0400
committerDavid Teigland <teigland@redhat.com>2023-08-10 10:33:03 -0500
commit1151935182b40bbe398905850f6f7f4fbb262e06 (patch)
tree1a15caa862be793db9bf5413c1620fbe22848cbf /fs/dlm/dir.c
parentb9d2f6ada0083bad46f37a1238fea718b575e0fa (diff)
downloadlinux-1151935182b40bbe398905850f6f7f4fbb262e06.tar.gz
fs: dlm: constify receive buffer
The dlm receive buffer should be never manipulated as DLM is the last instance of parsing layer. This patch constify the whole receive buffer so we are sure it never gets manipulated when it's being parsed. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/dir.c')
-rw-r--r--fs/dlm/dir.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c
index 768cf8d43b2b4b..f6acba4310a7b9 100644
--- a/fs/dlm/dir.c
+++ b/fs/dlm/dir.c
@@ -196,7 +196,8 @@ int dlm_recover_directory(struct dlm_ls *ls, uint64_t seq)
return error;
}
-static struct dlm_rsb *find_rsb_root(struct dlm_ls *ls, char *name, int len)
+static struct dlm_rsb *find_rsb_root(struct dlm_ls *ls, const char *name,
+ int len)
{
struct dlm_rsb *r;
uint32_t hash, bucket;
@@ -232,7 +233,7 @@ static struct dlm_rsb *find_rsb_root(struct dlm_ls *ls, char *name, int len)
for rsb's we're master of and whose directory node matches the requesting
node. inbuf is the rsb name last sent, inlen is the name's length */
-void dlm_copy_master_names(struct dlm_ls *ls, char *inbuf, int inlen,
+void dlm_copy_master_names(struct dlm_ls *ls, const char *inbuf, int inlen,
char *outbuf, int outlen, int nodeid)
{
struct list_head *list;