Add a simple helper to link with a kernel space file name and switch the early init code over to it. Remove the now unused ksys_link.
Showing the changes to include/linux (2 of 6 files). Show all
Unified · Split
| @@ -8,5 +8,6 @@ int __init init_chroot(const char *filename); · 7 unmodified lines | ||
| 8 | 8 | int __init init_chown(const char *filename, uid_t user, gid_t group, int flags); |
| 9 | 9 | int __init init_chmod(const char *filename, umode_t mode); |
| 10 | 10 | int __init init_eaccess(const char *filename); |
| 11 | +int __init init_link(const char *oldname, const char *newname); | |
| 11 | 12 | int __init init_unlink(const char *pathname); |
| 12 | 13 | int __init init_rmdir(const char *pathname); |
| @@ -1295,15 +1295,6 @@ static inline long ksys_mknod(const char __user *filename, umode_t mode, · 1294 unmodified lines | ||
| 1295 | 1295 | return do_mknodat(AT_FDCWD, filename, mode, dev); |
| 1296 | 1296 | } |
| 1297 | 1297 | |
| 1298 | −extern int do_linkat(int olddfd, const char __user *oldname, int newdfd, | |
| 1299 | − const char __user *newname, int flags); | |
| 1300 | − | |
| 1301 | −static inline long ksys_link(const char __user *oldname, | |
| 1302 | − const char __user *newname) | |
| 1303 | −{ | |
| 1304 | − return do_linkat(AT_FDCWD, oldname, AT_FDCWD, newname, 0); | |
| 1305 | −} | |
| 1306 | − | |
| 1307 | 1298 | extern int do_fchownat(int dfd, const char __user *filename, uid_t user, |
| 1308 | 1299 | gid_t group, int flag); |
| 1309 | 1300 | |