Lines Matching full: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
157 error = security_path_mknod(&path, dentry, mode, dev); in init_mknod()
158 if (!error) in init_mknod()
159 error = vfs_mknod(mnt_idmap(path.mnt), path.dentry->d_inode, in init_mknod()
162 return error; in init_mknod()
170 int error; in init_link() local
172 error = kern_path(oldname, 0, &old_path); in init_link()
173 if (error) in init_link()
174 return error; in init_link()
177 error = PTR_ERR(new_dentry); in init_link()
181 error = -EXDEV; in init_link()
185 error = may_linkat(idmap, &old_path); in init_link()
186 if (unlikely(error)) in init_link()
188 error = security_path_link(old_path.dentry, &new_path, new_dentry); in init_link()
189 if (error) in init_link()
191 error = vfs_link(old_path.dentry, idmap, new_path.dentry->d_inode, in init_link()
197 return error; in init_link()
204 int error; in init_symlink() local
209 error = security_path_symlink(&path, dentry, oldname); in init_symlink()
210 if (!error) in init_symlink()
211 error = vfs_symlink(mnt_idmap(path.mnt), path.dentry->d_inode, in init_symlink()
214 return error; in init_symlink()
226 int error; in init_mkdir() local
232 error = security_path_mkdir(&path, dentry, mode); in init_mkdir()
233 if (!error) in init_mkdir()
234 error = vfs_mkdir(mnt_idmap(path.mnt), path.dentry->d_inode, in init_mkdir()
237 return error; in init_mkdir()
248 int error; in init_utimes() local
250 error = kern_path(filename, 0, &path); in init_utimes()
251 if (error) in init_utimes()
252 return error; in init_utimes()
253 error = vfs_utimes(&path, ts); in init_utimes()
255 return error; in init_utimes()