1 From 72083646528d4887b920deb71b37e09bc7d227bb Mon Sep 17 00:00:00 2001
2 From: Linus Torvalds <torvalds@linux-foundation.org>
3 Date: Sun, 28 Nov 2010 16:27:19 -0800
4 Subject: Un-inline get_pipe_info() helper function
6 From: Linus Torvalds <torvalds@linux-foundation.org>
8 commit 72083646528d4887b920deb71b37e09bc7d227bb upstream.
10 This avoids some include-file hell, and the function isn't really
11 important enough to be inlined anyway.
13 Reported-by: Ingo Molnar <mingo@elte.hu>
14 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 fs/pipe.c | 12 ++++++++++++
19 include/linux/pipe_fs_i.h | 13 +------------
20 2 files changed, 13 insertions(+), 12 deletions(-)
24 @@ -1197,6 +1197,18 @@ int pipe_proc_fn(struct ctl_table *table
29 + * After the inode slimming patch, i_pipe/i_bdev/i_cdev share the same
30 + * location, so checking ->i_pipe is not enough to verify that this is a
33 +struct pipe_inode_info *get_pipe_info(struct file *file)
35 + struct inode *i = file->f_path.dentry->d_inode;
37 + return S_ISFIFO(i->i_mode) ? i->i_pipe : NULL;
40 long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
42 struct pipe_inode_info *pipe;
43 --- a/include/linux/pipe_fs_i.h
44 +++ b/include/linux/pipe_fs_i.h
45 @@ -160,17 +160,6 @@ void generic_pipe_buf_release(struct pip
47 /* for F_SETPIPE_SZ and F_GETPIPE_SZ */
48 long pipe_fcntl(struct file *, unsigned int, unsigned long arg);
51 - * After the inode slimming patch, i_pipe/i_bdev/i_cdev share the same
52 - * location, so checking ->i_pipe is not enough to verify that this is a
55 -static inline struct pipe_inode_info *get_pipe_info(struct file *file)
57 - struct inode *i = file->f_path.dentry->d_inode;
59 - return S_ISFIFO(i->i_mode) ? i->i_pipe : NULL;
61 +struct pipe_inode_info *get_pipe_info(struct file *file);