diff options
Diffstat (limited to 'fs/pipe.c')
-rw-r--r-- | fs/pipe.c | 23 |
1 files changed, 4 insertions, 19 deletions
@@ -667,10 +667,7 @@ pipe_read_fasync(int fd, struct file *filp, int on) | |||
667 | retval = fasync_helper(fd, filp, on, &inode->i_pipe->fasync_readers); | 667 | retval = fasync_helper(fd, filp, on, &inode->i_pipe->fasync_readers); |
668 | mutex_unlock(&inode->i_mutex); | 668 | mutex_unlock(&inode->i_mutex); |
669 | 669 | ||
670 | if (retval < 0) | 670 | return retval; |
671 | return retval; | ||
672 | |||
673 | return 0; | ||
674 | } | 671 | } |
675 | 672 | ||
676 | 673 | ||
@@ -684,10 +681,7 @@ pipe_write_fasync(int fd, struct file *filp, int on) | |||
684 | retval = fasync_helper(fd, filp, on, &inode->i_pipe->fasync_writers); | 681 | retval = fasync_helper(fd, filp, on, &inode->i_pipe->fasync_writers); |
685 | mutex_unlock(&inode->i_mutex); | 682 | mutex_unlock(&inode->i_mutex); |
686 | 683 | ||
687 | if (retval < 0) | 684 | return retval; |
688 | return retval; | ||
689 | |||
690 | return 0; | ||
691 | } | 685 | } |
692 | 686 | ||
693 | 687 | ||
@@ -706,11 +700,7 @@ pipe_rdwr_fasync(int fd, struct file *filp, int on) | |||
706 | fasync_helper(-1, filp, 0, &pipe->fasync_readers); | 700 | fasync_helper(-1, filp, 0, &pipe->fasync_readers); |
707 | } | 701 | } |
708 | mutex_unlock(&inode->i_mutex); | 702 | mutex_unlock(&inode->i_mutex); |
709 | 703 | return retval; | |
710 | if (retval < 0) | ||
711 | return retval; | ||
712 | |||
713 | return 0; | ||
714 | } | 704 | } |
715 | 705 | ||
716 | 706 | ||
@@ -870,7 +860,7 @@ static char *pipefs_dname(struct dentry *dentry, char *buffer, int buflen) | |||
870 | dentry->d_inode->i_ino); | 860 | dentry->d_inode->i_ino); |
871 | } | 861 | } |
872 | 862 | ||
873 | static struct dentry_operations pipefs_dentry_operations = { | 863 | static const struct dentry_operations pipefs_dentry_operations = { |
874 | .d_delete = pipefs_delete_dentry, | 864 | .d_delete = pipefs_delete_dentry, |
875 | .d_dname = pipefs_dname, | 865 | .d_dname = pipefs_dname, |
876 | }; | 866 | }; |
@@ -1034,11 +1024,6 @@ int do_pipe_flags(int *fd, int flags) | |||
1034 | return error; | 1024 | return error; |
1035 | } | 1025 | } |
1036 | 1026 | ||
1037 | int do_pipe(int *fd) | ||
1038 | { | ||
1039 | return do_pipe_flags(fd, 0); | ||
1040 | } | ||
1041 | |||
1042 | /* | 1027 | /* |
1043 | * sys_pipe() is the normal C calling standard for creating | 1028 | * sys_pipe() is the normal C calling standard for creating |
1044 | * a pipe. It's not the way Unix traditionally does this, though. | 1029 | * a pipe. It's not the way Unix traditionally does this, though. |