diff --git a/[refs] b/[refs] index 44308ac4ea85..5d0285d0d9bf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ea635c64e007061f6468ece5cc9cc62d41d4ecf2 +refs/heads/master: cc967be54710d97c05229b2e5ba2d00df84ddd64 diff --git a/trunk/fs/pipe.c b/trunk/fs/pipe.c index d79872eba09a..60da077400f1 100644 --- a/trunk/fs/pipe.c +++ b/trunk/fs/pipe.c @@ -1169,14 +1169,18 @@ long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg) switch (cmd) { case F_SETPIPE_SZ: - if (!capable(CAP_SYS_ADMIN) && arg > pipe_max_pages) - return -EINVAL; + if (!capable(CAP_SYS_ADMIN) && arg > pipe_max_pages) { + ret = -EINVAL; + goto out; + } /* * The pipe needs to be at least 2 pages large to * guarantee POSIX behaviour. */ - if (arg < 2) - return -EINVAL; + if (arg < 2) { + ret = -EINVAL; + goto out; + } ret = pipe_set_size(pipe, arg); break; case F_GETPIPE_SZ: @@ -1187,6 +1191,7 @@ long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg) break; } +out: mutex_unlock(&pipe->inode->i_mutex); return ret; }