Commit 4b8a8f1e authored by Al Viro's avatar Al Viro

get rid of the last free_pipe_info() callers

and rename __free_pipe_info() to free_pipe_info()
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7bee130e
...@@ -751,7 +751,7 @@ pipe_release(struct inode *inode, struct file *file) ...@@ -751,7 +751,7 @@ pipe_release(struct inode *inode, struct file *file)
__pipe_unlock(pipe); __pipe_unlock(pipe);
if (kill) if (kill)
__free_pipe_info(pipe); free_pipe_info(pipe);
return 0; return 0;
} }
...@@ -795,7 +795,7 @@ struct pipe_inode_info *alloc_pipe_info(void) ...@@ -795,7 +795,7 @@ struct pipe_inode_info *alloc_pipe_info(void)
return NULL; return NULL;
} }
void __free_pipe_info(struct pipe_inode_info *pipe) void free_pipe_info(struct pipe_inode_info *pipe)
{ {
int i; int i;
...@@ -810,12 +810,6 @@ void __free_pipe_info(struct pipe_inode_info *pipe) ...@@ -810,12 +810,6 @@ void __free_pipe_info(struct pipe_inode_info *pipe)
kfree(pipe); kfree(pipe);
} }
void free_pipe_info(struct inode *inode)
{
__free_pipe_info(inode->i_pipe);
inode->i_pipe = NULL;
}
static struct vfsmount *pipe_mnt __read_mostly; static struct vfsmount *pipe_mnt __read_mostly;
/* /*
...@@ -911,12 +905,12 @@ int create_pipe_files(struct file **res, int flags) ...@@ -911,12 +905,12 @@ int create_pipe_files(struct file **res, int flags)
err_file: err_file:
put_filp(f); put_filp(f);
err_dentry: err_dentry:
free_pipe_info(inode); free_pipe_info(inode->i_pipe);
path_put(&path); path_put(&path);
return err; return err;
err_inode: err_inode:
free_pipe_info(inode); free_pipe_info(inode->i_pipe);
iput(inode); iput(inode);
return err; return err;
} }
...@@ -1039,7 +1033,7 @@ static int fifo_open(struct inode *inode, struct file *filp) ...@@ -1039,7 +1033,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
if (unlikely(inode->i_pipe)) { if (unlikely(inode->i_pipe)) {
inode->i_pipe->files++; inode->i_pipe->files++;
spin_unlock(&inode->i_lock); spin_unlock(&inode->i_lock);
__free_pipe_info(pipe); free_pipe_info(pipe);
pipe = inode->i_pipe; pipe = inode->i_pipe;
} else { } else {
inode->i_pipe = pipe; inode->i_pipe = pipe;
...@@ -1143,7 +1137,7 @@ static int fifo_open(struct inode *inode, struct file *filp) ...@@ -1143,7 +1137,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
spin_unlock(&inode->i_lock); spin_unlock(&inode->i_lock);
__pipe_unlock(pipe); __pipe_unlock(pipe);
if (kill) if (kill)
__free_pipe_info(pipe); free_pipe_info(pipe);
return ret; return ret;
} }
......
...@@ -147,8 +147,7 @@ int pipe_proc_fn(struct ctl_table *, int, void __user *, size_t *, loff_t *); ...@@ -147,8 +147,7 @@ int pipe_proc_fn(struct ctl_table *, int, void __user *, size_t *, loff_t *);
void pipe_wait(struct pipe_inode_info *pipe); void pipe_wait(struct pipe_inode_info *pipe);
struct pipe_inode_info *alloc_pipe_info(void); struct pipe_inode_info *alloc_pipe_info(void);
void free_pipe_info(struct inode * inode); void free_pipe_info(struct pipe_inode_info *);
void __free_pipe_info(struct pipe_inode_info *);
/* Generic pipe buffer ops functions */ /* Generic pipe buffer ops functions */
void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int); void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int);
......
...@@ -847,7 +847,7 @@ void do_exit(long code) ...@@ -847,7 +847,7 @@ void do_exit(long code)
exit_io_context(tsk); exit_io_context(tsk);
if (tsk->splice_pipe) if (tsk->splice_pipe)
__free_pipe_info(tsk->splice_pipe); free_pipe_info(tsk->splice_pipe);
if (tsk->task_frag.page) if (tsk->task_frag.page)
put_page(tsk->task_frag.page); put_page(tsk->task_frag.page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment