Lines Matching refs:error
47 int error; in init_chdir() local
49 error = kern_path(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, &path); in init_chdir()
50 if (error) in init_chdir()
51 return error; in init_chdir()
52 error = path_permission(&path, MAY_EXEC | MAY_CHDIR); in init_chdir()
53 if (!error) in init_chdir()
56 return error; in init_chdir()
62 int error; in init_chroot() local
64 error = kern_path(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, &path); in init_chroot()
65 if (error) in init_chroot()
66 return error; in init_chroot()
67 error = path_permission(&path, MAY_EXEC | MAY_CHDIR); in init_chroot()
68 if (error) in init_chroot()
70 error = -EPERM; in init_chroot()
73 error = security_path_chroot(&path); in init_chroot()
74 if (error) in init_chroot()
79 return error; in init_chroot()
86 int error; in init_chown() local
88 error = kern_path(filename, lookup_flags, &path); in init_chown()
89 if (error) in init_chown()
90 return error; in init_chown()
91 error = mnt_want_write(path.mnt); in init_chown()
92 if (!error) { in init_chown()
93 error = chown_common(&path, user, group); in init_chown()
97 return error; in init_chown()
103 int error; in init_chmod() local
105 error = kern_path(filename, LOOKUP_FOLLOW, &path); in init_chmod()
106 if (error) in init_chmod()
107 return error; in init_chmod()
108 error = chmod_common(&path, mode); in init_chmod()
110 return error; in init_chmod()
116 int error; in init_eaccess() local
118 error = kern_path(filename, LOOKUP_FOLLOW, &path); in init_eaccess()
119 if (error) in init_eaccess()
120 return error; in init_eaccess()
121 error = path_permission(&path, MAY_ACCESS); in init_eaccess()
123 return error; in init_eaccess()
130 int error; in init_stat() local
132 error = kern_path(filename, lookup_flags, &path); in init_stat()
133 if (error) in init_stat()
134 return error; in init_stat()
135 error = vfs_getattr(&path, stat, STATX_BASIC_STATS, in init_stat()
138 return error; in init_stat()
145 int error; in init_mknod() local
158 error = security_path_mknod(&path, dentry, mode, dev); in init_mknod()
159 if (!error) in init_mknod()
160 error = vfs_mknod(mnt_idmap(path.mnt), path.dentry->d_inode, in init_mknod()
163 return error; in init_mknod()
171 int error; in init_link() local
173 error = kern_path(oldname, 0, &old_path); in init_link()
174 if (error) in init_link()
175 return error; in init_link()
178 error = PTR_ERR(new_dentry); in init_link()
182 error = -EXDEV; in init_link()
186 error = may_linkat(idmap, &old_path); in init_link()
187 if (unlikely(error)) in init_link()
189 error = security_path_link(old_path.dentry, &new_path, new_dentry); in init_link()
190 if (error) in init_link()
192 error = vfs_link(old_path.dentry, idmap, new_path.dentry->d_inode, in init_link()
198 return error; in init_link()
205 int error; in init_symlink() local
210 error = security_path_symlink(&path, dentry, oldname); in init_symlink()
211 if (!error) in init_symlink()
212 error = vfs_symlink(mnt_idmap(path.mnt), path.dentry->d_inode, in init_symlink()
215 return error; in init_symlink()
227 int error; in init_mkdir() local
234 error = security_path_mkdir(&path, dentry, mode); in init_mkdir()
235 if (!error) in init_mkdir()
236 error = vfs_mkdir(mnt_idmap(path.mnt), path.dentry->d_inode, in init_mkdir()
239 return error; in init_mkdir()
250 int error; in init_utimes() local
252 error = kern_path(filename, 0, &path); in init_utimes()
253 if (error) in init_utimes()
254 return error; in init_utimes()
255 error = vfs_utimes(&path, ts); in init_utimes()
257 return error; in init_utimes()