Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
153d182f
Commit
153d182f
authored
Jan 14, 2003
by
Russell Cattelan
Committed by
Christoph Hellwig
Jan 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] make *cmn_err interrupt safe
SGI Modid: 2.5.x-xfs:slinx:136126a
parent
89e49671
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
fs/xfs/support/debug.c
fs/xfs/support/debug.c
+6
-4
No files found.
fs/xfs/support/debug.c
View file @
153d182f
...
...
@@ -86,12 +86,13 @@ cmn_err(register int level, char *fmt, ...)
{
char
*
fp
=
fmt
;
int
len
;
int
flags
;
va_list
ap
;
level
&=
XFS_ERR_MASK
;
if
(
level
>
XFS_MAX_ERR_LEVEL
)
level
=
XFS_MAX_ERR_LEVEL
;
spin_lock
(
&
xfs_err_lock
);
spin_lock
_irqsave
(
&
xfs_err_lock
,
flags
);
va_start
(
ap
,
fmt
);
if
(
*
fmt
==
'!'
)
fp
++
;
len
=
vsprintf
(
message
,
fp
,
ap
);
...
...
@@ -99,7 +100,7 @@ cmn_err(register int level, char *fmt, ...)
strcat
(
message
,
"
\n
"
);
printk
(
"%s%s"
,
err_level
[
level
],
message
);
va_end
(
ap
);
spin_unlock
(
&
xfs_err_lock
);
spin_unlock
_irqrestore
(
&
xfs_err_lock
,
flags
);
if
(
level
==
CE_PANIC
)
BUG
();
...
...
@@ -110,15 +111,16 @@ void
icmn_err
(
register
int
level
,
char
*
fmt
,
va_list
ap
)
{
int
len
;
int
flags
;
level
&=
XFS_ERR_MASK
;
if
(
level
>
XFS_MAX_ERR_LEVEL
)
level
=
XFS_MAX_ERR_LEVEL
;
spin_lock
(
&
xfs_err_lock
);
spin_lock
_irqsave
(
&
xfs_err_lock
,
flags
);
len
=
vsprintf
(
message
,
fmt
,
ap
);
if
(
message
[
len
-
1
]
!=
'\n'
)
strcat
(
message
,
"
\n
"
);
spin_unlock
(
&
xfs_err_lock
);
spin_unlock
_irqrestore
(
&
xfs_err_lock
,
flags
);
printk
(
"%s%s"
,
err_level
[
level
],
message
);
if
(
level
==
CE_PANIC
)
BUG
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment