fs/fcntl: f_setown, allow returning error
Allow f_setown to return an error value. We will fail in the next patch with EINVAL for bad input to f_setown, so tile the path for the later patch. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Reviewed-by: Jeff Layton <jlayton@redhat.com> Cc: Jeff Layton <jlayton@poochiereds.net> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Jeff Layton <jlayton@redhat.com>
This commit is contained in:
@@ -950,8 +950,7 @@ static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg)
|
||||
err = -EFAULT;
|
||||
if (get_user(pid, (int __user *)argp))
|
||||
break;
|
||||
f_setown(sock->file, pid, 1);
|
||||
err = 0;
|
||||
err = f_setown(sock->file, pid, 1);
|
||||
break;
|
||||
case FIOGETOWN:
|
||||
case SIOCGPGRP:
|
||||
|
Reference in New Issue
Block a user