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
2be7fd55
Commit
2be7fd55
authored
Aug 21, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch spufs/coredump to iterate_fd()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
179e037f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
arch/powerpc/platforms/cell/spufs/coredump.c
arch/powerpc/platforms/cell/spufs/coredump.c
+20
-20
No files found.
arch/powerpc/platforms/cell/spufs/coredump.c
View file @
2be7fd55
...
...
@@ -106,6 +106,17 @@ static int spufs_ctx_note_size(struct spu_context *ctx, int dfd)
return
total
;
}
static
int
match_context
(
const
void
*
v
,
struct
file
*
file
,
unsigned
fd
)
{
struct
spu_context
*
ctx
;
if
(
file
->
f_op
!=
&
spufs_context_fops
)
return
0
;
ctx
=
SPUFS_I
(
file
->
f_dentry
->
d_inode
)
->
i_ctx
;
if
(
ctx
->
flags
&
SPU_CREATE_NOSCHED
)
return
0
;
return
fd
+
1
;
}
/*
* The additional architecture-specific notes for Cell are various
* context files in the spu context.
...
...
@@ -115,29 +126,18 @@ static int spufs_ctx_note_size(struct spu_context *ctx, int dfd)
* internal functionality to dump them without needing to actually
* open the files.
*/
/*
* descriptor table is not shared, so files can't change or go away.
*/
static
struct
spu_context
*
coredump_next_context
(
int
*
fd
)
{
struct
fdtable
*
fdt
=
files_fdtable
(
current
->
files
);
struct
file
*
file
;
struct
spu_context
*
ctx
=
NULL
;
for
(;
*
fd
<
fdt
->
max_fds
;
(
*
fd
)
++
)
{
if
(
!
fd_is_open
(
*
fd
,
fdt
))
continue
;
file
=
fcheck
(
*
fd
);
if
(
!
file
||
file
->
f_op
!=
&
spufs_context_fops
)
continue
;
ctx
=
SPUFS_I
(
file
->
f_dentry
->
d_inode
)
->
i_ctx
;
if
(
ctx
->
flags
&
SPU_CREATE_NOSCHED
)
continue
;
break
;
}
return
ctx
;
int
n
=
iterate_fd
(
current
->
files
,
*
fd
,
match_context
,
NULL
);
if
(
!
n
)
return
NULL
;
*
fd
=
n
-
1
;
file
=
fcheck
(
*
fd
);
return
SPUFS_I
(
file
->
f_dentry
->
d_inode
)
->
i_ctx
;
}
int
spufs_coredump_extra_notes_size
(
void
)
...
...
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