History

net: add __sys_connect_file() helper

This is identical to __sys_connect(), except it takes a struct file instead of an fd, and it also allows passing in extra file->f_flags flags. The latter is done to support masking in O_NONBLOCK without manipulating the original file flags. No functional changes in this patch.

Jens Axboe committed 6 years ago

Commit bd3ded31 parent c4a2ed72 files · +25 −8Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/socket.h+3−0
@@ -399,6 +399,9 @@ extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, · 398 unmodified lines
399399 int __user *upeer_addrlen, int flags);
400400 extern int __sys_socket(int family, int type, int protocol);
401401 extern int __sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen);
402+extern int __sys_connect_file(struct file *file,
403+ struct sockaddr __user *uservaddr, int addrlen,
404+ int file_flags);
402405 extern int __sys_connect(int fd, struct sockaddr __user *uservaddr,
403406 int addrlen);
404407 extern int __sys_listen(int fd, int backlog);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t