History

nsfs: clean-up ns_get_path() signature to return int

ns_get_path() and ns_get_path_cb() only ever return either NULL or an ERR_PTR. It is far more idiomatic to simply return an integer, and it makes all of the callers of ns_get_path() more straightforward to read.

Aleksa Sarai committed 6 years ago

Commit ce623f81 parent 2b981495 files · +26 −27Browse files

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

Unified · Split

include/linux/proc_ns.h+2−2
@@ -76,10 +76,10 @@ static inline int ns_alloc_inum(struct ns_common *ns) · 75 unmodified lines
7676
7777 extern struct file *proc_ns_fget(int fd);
7878 #define get_proc_ns(inode) ((struct ns_common *)(inode)->i_private)
79−extern void *ns_get_path(struct path *path, struct task_struct *task,
79+extern int ns_get_path(struct path *path, struct task_struct *task,
8080 const struct proc_ns_operations *ns_ops);
8181 typedef struct ns_common *ns_get_path_helper_t(void *);
82−extern void *ns_get_path_cb(struct path *path, ns_get_path_helper_t ns_get_cb,
82+extern int ns_get_path_cb(struct path *path, ns_get_path_helper_t ns_get_cb,
8383 void *private_data);
8484
8585 extern int ns_get_name(char *buf, size_t size, struct task_struct *task,

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