Add a simple helper to chmod with a kernel space file name and switch the early init code over to it.
Showing the changes to include/linux (2 of 6 files). Show all
Unified · Split
| @@ -6,5 +6,6 @@ int __init init_umount(const char *name, int flags); · 5 unmodified lines | ||
| 6 | 6 | int __init init_chdir(const char *filename); |
| 7 | 7 | int __init init_chroot(const char *filename); |
| 8 | 8 | int __init init_chown(const char *filename, uid_t user, gid_t group, int flags); |
| 9 | +int __init init_chmod(const char *filename, umode_t mode); | |
| 9 | 10 | int __init init_unlink(const char *pathname); |
| 10 | 11 | int __init init_rmdir(const char *pathname); |
| @@ -1304,13 +1304,6 @@ static inline long ksys_link(const char __user *oldname, · 1303 unmodified lines | ||
| 1304 | 1304 | return do_linkat(AT_FDCWD, oldname, AT_FDCWD, newname, 0); |
| 1305 | 1305 | } |
| 1306 | 1306 | |
| 1307 | −extern int do_fchmodat(int dfd, const char __user *filename, umode_t mode); | |
| 1308 | − | |
| 1309 | −static inline int ksys_chmod(const char __user *filename, umode_t mode) | |
| 1310 | −{ | |
| 1311 | − return do_fchmodat(AT_FDCWD, filename, mode); | |
| 1312 | −} | |
| 1313 | − | |
| 1314 | 1307 | long do_faccessat(int dfd, const char __user *filename, int mode, int flags); |
| 1315 | 1308 | |
| 1316 | 1309 | static inline long ksys_access(const char __user *filename, int mode) |