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
Hide 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, ...)
...
@@ -86,12 +86,13 @@ cmn_err(register int level, char *fmt, ...)
{
{
char
*
fp
=
fmt
;
char
*
fp
=
fmt
;
int
len
;
int
len
;
int
flags
;
va_list
ap
;
va_list
ap
;
level
&=
XFS_ERR_MASK
;
level
&=
XFS_ERR_MASK
;
if
(
level
>
XFS_MAX_ERR_LEVEL
)
if
(
level
>
XFS_MAX_ERR_LEVEL
)
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
);
va_start
(
ap
,
fmt
);
if
(
*
fmt
==
'!'
)
fp
++
;
if
(
*
fmt
==
'!'
)
fp
++
;
len
=
vsprintf
(
message
,
fp
,
ap
);
len
=
vsprintf
(
message
,
fp
,
ap
);
...
@@ -99,7 +100,7 @@ cmn_err(register int level, char *fmt, ...)
...
@@ -99,7 +100,7 @@ cmn_err(register int level, char *fmt, ...)
strcat
(
message
,
"
\n
"
);
strcat
(
message
,
"
\n
"
);
printk
(
"%s%s"
,
err_level
[
level
],
message
);
printk
(
"%s%s"
,
err_level
[
level
],
message
);
va_end
(
ap
);
va_end
(
ap
);
spin_unlock
(
&
xfs_err_lock
);
spin_unlock
_irqrestore
(
&
xfs_err_lock
,
flags
);
if
(
level
==
CE_PANIC
)
if
(
level
==
CE_PANIC
)
BUG
();
BUG
();
...
@@ -110,15 +111,16 @@ void
...
@@ -110,15 +111,16 @@ void
icmn_err
(
register
int
level
,
char
*
fmt
,
va_list
ap
)
icmn_err
(
register
int
level
,
char
*
fmt
,
va_list
ap
)
{
{
int
len
;
int
len
;
int
flags
;
level
&=
XFS_ERR_MASK
;
level
&=
XFS_ERR_MASK
;
if
(
level
>
XFS_MAX_ERR_LEVEL
)
if
(
level
>
XFS_MAX_ERR_LEVEL
)
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
);
len
=
vsprintf
(
message
,
fmt
,
ap
);
if
(
message
[
len
-
1
]
!=
'\n'
)
if
(
message
[
len
-
1
]
!=
'\n'
)
strcat
(
message
,
"
\n
"
);
strcat
(
message
,
"
\n
"
);
spin_unlock
(
&
xfs_err_lock
);
spin_unlock
_irqrestore
(
&
xfs_err_lock
,
flags
);
printk
(
"%s%s"
,
err_level
[
level
],
message
);
printk
(
"%s%s"
,
err_level
[
level
],
message
);
if
(
level
==
CE_PANIC
)
if
(
level
==
CE_PANIC
)
BUG
();
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