mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 07:47:50 +00:00
init: add an init_chmod helper
Add a simple helper to chmod with a kernel space file name and switch the early init code over to it. Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -350,14 +350,14 @@ static int __init do_name(void)
|
||||
} else if (S_ISDIR(mode)) {
|
||||
ksys_mkdir(collected, mode);
|
||||
init_chown(collected, uid, gid, 0);
|
||||
ksys_chmod(collected, mode);
|
||||
init_chmod(collected, mode);
|
||||
dir_add(collected, mtime);
|
||||
} else if (S_ISBLK(mode) || S_ISCHR(mode) ||
|
||||
S_ISFIFO(mode) || S_ISSOCK(mode)) {
|
||||
if (maybe_link() == 0) {
|
||||
ksys_mknod(collected, mode, rdev);
|
||||
init_chown(collected, uid, gid, 0);
|
||||
ksys_chmod(collected, mode);
|
||||
init_chmod(collected, mode);
|
||||
do_utime(collected, mtime);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user