Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
d231412d
Commit
d231412d
authored
Aug 09, 2009
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch create_read_pipe() to alloc_file()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
2c48b9c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
fs/pipe.c
fs/pipe.c
+3
-9
No files found.
fs/pipe.c
View file @
d231412d
...
@@ -1029,20 +1029,14 @@ void free_write_pipe(struct file *f)
...
@@ -1029,20 +1029,14 @@ void free_write_pipe(struct file *f)
struct
file
*
create_read_pipe
(
struct
file
*
wrf
,
int
flags
)
struct
file
*
create_read_pipe
(
struct
file
*
wrf
,
int
flags
)
{
{
struct
file
*
f
=
get_empty_filp
();
/* Grab pipe from the writer */
struct
file
*
f
=
alloc_file
(
&
wrf
->
f_path
,
FMODE_READ
,
&
read_pipefifo_fops
);
if
(
!
f
)
if
(
!
f
)
return
ERR_PTR
(
-
ENFILE
);
return
ERR_PTR
(
-
ENFILE
);
/* Grab pipe from the writer */
f
->
f_path
=
wrf
->
f_path
;
path_get
(
&
wrf
->
f_path
);
path_get
(
&
wrf
->
f_path
);
f
->
f_mapping
=
wrf
->
f_path
.
dentry
->
d_inode
->
i_mapping
;
f
->
f_pos
=
0
;
f
->
f_flags
=
O_RDONLY
|
(
flags
&
O_NONBLOCK
);
f
->
f_flags
=
O_RDONLY
|
(
flags
&
O_NONBLOCK
);
f
->
f_op
=
&
read_pipefifo_fops
;
f
->
f_mode
=
FMODE_READ
;
f
->
f_version
=
0
;
return
f
;
return
f
;
}
}
...
...
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