Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocfs2: remove unused errmsg function and table

dlm_errmsg() has been unused since 2010's commit 0016eedc4185
("ocfs2_dlmfs: Use the stackglue.")

Remove dlm_errmsg() and the message table it indexes.

Link: https://lkml.kernel.org/r/20241022002543.302606-1-linux@treblig.org
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Dr. David Alan Gilbert and committed by
Andrew Morton
77e94b04 b5e60497

-55
-2
fs/ocfs2/dlm/dlmapi.h
··· 62 62 DLM_MAXSTATS, /* 41: upper limit for return code validation */ 63 63 }; 64 64 65 - /* for pretty-printing dlm_status error messages */ 66 - const char *dlm_errmsg(enum dlm_status err); 67 65 /* for pretty-printing dlm_status error names */ 68 66 const char *dlm_errname(enum dlm_status err); 69 67
-53
fs/ocfs2/dlm/dlmdebug.c
··· 164 164 [DLM_MAXSTATS] = "DLM_MAXSTATS", 165 165 }; 166 166 167 - static const char *dlm_errmsgs[] = { 168 - [DLM_NORMAL] = "request in progress", 169 - [DLM_GRANTED] = "request granted", 170 - [DLM_DENIED] = "request denied", 171 - [DLM_DENIED_NOLOCKS] = "request denied, out of system resources", 172 - [DLM_WORKING] = "async request in progress", 173 - [DLM_BLOCKED] = "lock request blocked", 174 - [DLM_BLOCKED_ORPHAN] = "lock request blocked by a orphan lock", 175 - [DLM_DENIED_GRACE_PERIOD] = "topological change in progress", 176 - [DLM_SYSERR] = "system error", 177 - [DLM_NOSUPPORT] = "unsupported", 178 - [DLM_CANCELGRANT] = "can't cancel convert: already granted", 179 - [DLM_IVLOCKID] = "bad lockid", 180 - [DLM_SYNC] = "synchronous request granted", 181 - [DLM_BADTYPE] = "bad resource type", 182 - [DLM_BADRESOURCE] = "bad resource handle", 183 - [DLM_MAXHANDLES] = "no more resource handles", 184 - [DLM_NOCLINFO] = "can't contact cluster manager", 185 - [DLM_NOLOCKMGR] = "can't contact lock manager", 186 - [DLM_NOPURGED] = "can't contact purge daemon", 187 - [DLM_BADARGS] = "bad api args", 188 - [DLM_VOID] = "no status", 189 - [DLM_NOTQUEUED] = "NOQUEUE was specified and request failed", 190 - [DLM_IVBUFLEN] = "invalid resource name length", 191 - [DLM_CVTUNGRANT] = "attempted to convert ungranted lock", 192 - [DLM_BADPARAM] = "invalid lock mode specified", 193 - [DLM_VALNOTVALID] = "value block has been invalidated", 194 - [DLM_REJECTED] = "request rejected, unrecognized client", 195 - [DLM_ABORT] = "blocked lock request cancelled", 196 - [DLM_CANCEL] = "conversion request cancelled", 197 - [DLM_IVRESHANDLE] = "invalid resource handle", 198 - [DLM_DEADLOCK] = "deadlock recovery refused this request", 199 - [DLM_DENIED_NOASTS] = "failed to allocate AST", 200 - [DLM_FORWARD] = "request must wait for primary's response", 201 - [DLM_TIMEOUT] = "timeout value for lock has expired", 202 - [DLM_IVGROUPID] = "invalid group specification", 203 - [DLM_VERS_CONFLICT] = "version conflicts prevent request handling", 204 - [DLM_BAD_DEVICE_PATH] = "Locks device does not exist or path wrong", 205 - [DLM_NO_DEVICE_PERMISSION] = "Client has insufficient perms for device", 206 - [DLM_NO_CONTROL_DEVICE] = "Cannot set options on opened device ", 207 - [DLM_RECOVERING] = "lock resource being recovered", 208 - [DLM_MIGRATING] = "lock resource being migrated", 209 - [DLM_MAXSTATS] = "invalid error number", 210 - }; 211 - 212 - const char *dlm_errmsg(enum dlm_status err) 213 - { 214 - if (err >= DLM_MAXSTATS || err < 0) 215 - return dlm_errmsgs[DLM_MAXSTATS]; 216 - return dlm_errmsgs[err]; 217 - } 218 - EXPORT_SYMBOL_GPL(dlm_errmsg); 219 - 220 167 const char *dlm_errname(enum dlm_status err) 221 168 { 222 169 if (err >= DLM_MAXSTATS || err < 0)