···11991199 return ret;12001200}1201120112021202+/*12031203+ * After the inode slimming patch, i_pipe/i_bdev/i_cdev share the same12041204+ * location, so checking ->i_pipe is not enough to verify that this is a12051205+ * pipe.12061206+ */12071207+struct pipe_inode_info *get_pipe_info(struct file *file)12081208+{12091209+ struct inode *i = file->f_path.dentry->d_inode;12101210+12111211+ return S_ISFIFO(i->i_mode) ? i->i_pipe : NULL;12121212+}12131213+12021214long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg)12031215{12041216 struct pipe_inode_info *pipe;
+1-12
include/linux/pipe_fs_i.h
···160160161161/* for F_SETPIPE_SZ and F_GETPIPE_SZ */162162long pipe_fcntl(struct file *, unsigned int, unsigned long arg);163163-164164-/*165165- * After the inode slimming patch, i_pipe/i_bdev/i_cdev share the same166166- * location, so checking ->i_pipe is not enough to verify that this is a167167- * pipe.168168- */169169-static inline struct pipe_inode_info *get_pipe_info(struct file *file)170170-{171171- struct inode *i = file->f_path.dentry->d_inode;172172-173173- return S_ISFIFO(i->i_mode) ? i->i_pipe : NULL;174174-}163163+struct pipe_inode_info *get_pipe_info(struct file *file);175164176165#endif