Skip to content

Commit

Permalink
get rid of the last free_pipe_info() callers
Browse files Browse the repository at this point in the history
and rename __free_pipe_info() to free_pipe_info()

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Apr 9, 2013
1 parent 7bee130 commit 4b8a8f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
18 changes: 6 additions & 12 deletions fs/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ pipe_release(struct inode *inode, struct file *file)
__pipe_unlock(pipe);

if (kill)
__free_pipe_info(pipe);
free_pipe_info(pipe);

return 0;
}
Expand Down Expand Up @@ -795,7 +795,7 @@ struct pipe_inode_info *alloc_pipe_info(void)
return NULL;
}

void __free_pipe_info(struct pipe_inode_info *pipe)
void free_pipe_info(struct pipe_inode_info *pipe)
{
int i;

Expand All @@ -810,12 +810,6 @@ void __free_pipe_info(struct pipe_inode_info *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;

/*
Expand Down Expand Up @@ -911,12 +905,12 @@ int create_pipe_files(struct file **res, int flags)
err_file:
put_filp(f);
err_dentry:
free_pipe_info(inode);
free_pipe_info(inode->i_pipe);
path_put(&path);
return err;

err_inode:
free_pipe_info(inode);
free_pipe_info(inode->i_pipe);
iput(inode);
return err;
}
Expand Down Expand Up @@ -1039,7 +1033,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
if (unlikely(inode->i_pipe)) {
inode->i_pipe->files++;
spin_unlock(&inode->i_lock);
__free_pipe_info(pipe);
free_pipe_info(pipe);
pipe = inode->i_pipe;
} else {
inode->i_pipe = pipe;
Expand Down Expand Up @@ -1143,7 +1137,7 @@ static int fifo_open(struct inode *inode, struct file *filp)
spin_unlock(&inode->i_lock);
__pipe_unlock(pipe);
if (kill)
__free_pipe_info(pipe);
free_pipe_info(pipe);
return ret;
}

Expand Down
3 changes: 1 addition & 2 deletions include/linux/pipe_fs_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

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 */
void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int);
Expand Down
2 changes: 1 addition & 1 deletion kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ void do_exit(long code)
exit_io_context(tsk);

if (tsk->splice_pipe)
__free_pipe_info(tsk->splice_pipe);
free_pipe_info(tsk->splice_pipe);

if (tsk->task_frag.page)
put_page(tsk->task_frag.page);
Expand Down

0 comments on commit 4b8a8f1

Please sign in to comment.