Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177392
b: refs/heads/master
c: d231412
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Dec 16, 2009
1 parent 9502b05 commit 7f56f12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c48b9c45579a9b5e3e74694eebf3d2451f3dbd3
refs/heads/master: d231412db66355e72d606f8403ee8b6bd8ad4f9a
12 changes: 3 additions & 9 deletions trunk/fs/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1029,20 +1029,14 @@ void free_write_pipe(struct file *f)

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)
return ERR_PTR(-ENFILE);

/* Grab pipe from the writer */
f->f_path = 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_op = &read_pipefifo_fops;
f->f_mode = FMODE_READ;
f->f_version = 0;

return f;
}
Expand Down

0 comments on commit 7f56f12

Please sign in to comment.