* [PATCH] fs/pipe.c: do free read pipe work in free_read_pipe()
@ 2009-01-21 11:20 Jiri Pirko
0 siblings, 0 replies; only message in thread
From: Jiri Pirko @ 2009-01-21 11:20 UTC (permalink / raw)
To: linux-kernel; +Cc: viro, linux-fsdevel
This patch just introduces function free_read_pipe() which do the free read pipe
work. This approach is similar to free_write_pipe().
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
fs/pipe.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/pipe.c b/fs/pipe.c
index 3a48ba5..44cdc45 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -989,6 +989,12 @@ struct file *create_read_pipe(struct file *wrf, int flags)
return f;
}
+void free_read_pipe(struct file *f)
+{
+ path_put(&f->f_path);
+ put_filp(f);
+}
+
int do_pipe_flags(int *fd, int flags)
{
struct file *fw, *fr;
@@ -1027,8 +1033,7 @@ int do_pipe_flags(int *fd, int flags)
err_fdr:
put_unused_fd(fdr);
err_read_pipe:
- path_put(&fr->f_path);
- put_filp(fr);
+ free_read_pipe(fr);
err_write_pipe:
free_write_pipe(fw);
return error;
--
1.6.0.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-01-21 11:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-21 11:20 [PATCH] fs/pipe.c: do free read pipe work in free_read_pipe() Jiri Pirko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).