Lines Matching full:rc
142 int rc; in ecryptfs_do_unlink() local
144 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_do_unlink()
146 if (!rc) { in ecryptfs_do_unlink()
148 rc = -EINVAL; in ecryptfs_do_unlink()
150 rc = vfs_unlink(&nop_mnt_idmap, lower_dir, lower_dentry, in ecryptfs_do_unlink()
153 if (rc) { in ecryptfs_do_unlink()
154 printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc); in ecryptfs_do_unlink()
163 if (!rc) in ecryptfs_do_unlink()
165 return rc; in ecryptfs_do_unlink()
184 int rc; in ecryptfs_do_create() local
189 rc = lock_parent(ecryptfs_dentry, &lower_dentry, &lower_dir); in ecryptfs_do_create()
190 if (!rc) in ecryptfs_do_create()
191 rc = vfs_create(&nop_mnt_idmap, lower_dir, in ecryptfs_do_create()
193 if (rc) { in ecryptfs_do_create()
195 "rc = [%d]\n", __func__, rc); in ecryptfs_do_create()
196 inode = ERR_PTR(rc); in ecryptfs_do_create()
225 int rc = 0; in ecryptfs_initialize_file() local
233 rc = ecryptfs_new_file_context(ecryptfs_inode); in ecryptfs_initialize_file()
234 if (rc) { in ecryptfs_initialize_file()
236 "context; rc = [%d]\n", rc); in ecryptfs_initialize_file()
239 rc = ecryptfs_get_lower_file(ecryptfs_dentry, ecryptfs_inode); in ecryptfs_initialize_file()
240 if (rc) { in ecryptfs_initialize_file()
243 "[%pd]; rc = [%d]\n", __func__, in ecryptfs_initialize_file()
244 ecryptfs_dentry, rc); in ecryptfs_initialize_file()
247 rc = ecryptfs_write_metadata(ecryptfs_dentry, ecryptfs_inode); in ecryptfs_initialize_file()
248 if (rc) in ecryptfs_initialize_file()
249 printk(KERN_ERR "Error writing headers; rc = [%d]\n", rc); in ecryptfs_initialize_file()
252 return rc; in ecryptfs_initialize_file()
269 int rc; in ecryptfs_create() local
276 rc = PTR_ERR(ecryptfs_inode); in ecryptfs_create()
281 rc = ecryptfs_initialize_file(ecryptfs_dentry, ecryptfs_inode); in ecryptfs_create()
282 if (rc) { in ecryptfs_create()
290 return rc; in ecryptfs_create()
296 int rc; in ecryptfs_i_size_read() local
298 rc = ecryptfs_get_lower_file(dentry, inode); in ecryptfs_i_size_read()
299 if (rc) { in ecryptfs_i_size_read()
302 "[%pd]; rc = [%d]\n", __func__, in ecryptfs_i_size_read()
303 dentry, rc); in ecryptfs_i_size_read()
304 return rc; in ecryptfs_i_size_read()
312 rc = ecryptfs_read_and_validate_header_region(inode); in ecryptfs_i_size_read()
314 if (rc) { in ecryptfs_i_size_read()
315 rc = ecryptfs_read_and_validate_xattr_region(dentry, inode); in ecryptfs_i_size_read()
316 if (!rc) in ecryptfs_i_size_read()
333 int rc = 0; in ecryptfs_lookup_interpose() local
364 printk(KERN_ERR "%s: Error interposing; rc = [%ld]\n", in ecryptfs_lookup_interpose()
369 rc = ecryptfs_i_size_read(dentry, inode); in ecryptfs_lookup_interpose()
370 if (rc) { in ecryptfs_lookup_interpose()
372 return ERR_PTR(rc); in ecryptfs_lookup_interpose()
400 int rc = 0; in ecryptfs_lookup() local
407 rc = ecryptfs_encrypt_and_encode_filename( in ecryptfs_lookup()
410 if (rc) { in ecryptfs_lookup()
412 "filename; rc = [%d]\n", __func__, rc); in ecryptfs_lookup()
413 return ERR_PTR(rc); in ecryptfs_lookup()
439 int rc; in ecryptfs_link() local
443 rc = lock_parent(new_dentry, &lower_new_dentry, &lower_dir); in ecryptfs_link()
444 if (!rc) in ecryptfs_link()
445 rc = vfs_link(lower_old_dentry, &nop_mnt_idmap, lower_dir, in ecryptfs_link()
447 if (rc || d_really_is_negative(lower_new_dentry)) in ecryptfs_link()
449 rc = ecryptfs_interpose(lower_new_dentry, new_dentry, dir->i_sb); in ecryptfs_link()
450 if (rc) in ecryptfs_link()
459 return rc; in ecryptfs_link()
471 int rc; in ecryptfs_symlink() local
478 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_symlink()
479 if (rc) in ecryptfs_symlink()
483 rc = ecryptfs_encrypt_and_encode_filename(&encoded_symname, in ecryptfs_symlink()
487 if (rc) in ecryptfs_symlink()
489 rc = vfs_symlink(&nop_mnt_idmap, lower_dir, lower_dentry, in ecryptfs_symlink()
492 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
494 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
495 if (rc) in ecryptfs_symlink()
503 return rc; in ecryptfs_symlink()
509 int rc; in ecryptfs_mkdir() local
513 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mkdir()
514 if (!rc) in ecryptfs_mkdir()
515 rc = vfs_mkdir(&nop_mnt_idmap, lower_dir, in ecryptfs_mkdir()
517 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mkdir()
519 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
520 if (rc) in ecryptfs_mkdir()
529 return rc; in ecryptfs_mkdir()
536 int rc; in ecryptfs_rmdir() local
538 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_rmdir()
540 if (!rc) { in ecryptfs_rmdir()
542 rc = -EINVAL; in ecryptfs_rmdir()
544 rc = vfs_rmdir(&nop_mnt_idmap, lower_dir, lower_dentry); in ecryptfs_rmdir()
546 if (!rc) { in ecryptfs_rmdir()
553 if (!rc) in ecryptfs_rmdir()
555 return rc; in ecryptfs_rmdir()
562 int rc; in ecryptfs_mknod() local
566 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mknod()
567 if (!rc) in ecryptfs_mknod()
568 rc = vfs_mknod(&nop_mnt_idmap, lower_dir, in ecryptfs_mknod()
570 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
572 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
573 if (rc) in ecryptfs_mknod()
581 return rc; in ecryptfs_mknod()
589 int rc; in ecryptfs_rename() local
613 rc = -EINVAL; in ecryptfs_rename()
625 rc = -ENOTEMPTY; in ecryptfs_rename()
635 rc = vfs_rename(&rd); in ecryptfs_rename()
636 if (rc) in ecryptfs_rename()
647 return rc; in ecryptfs_rename()
656 int rc; in ecryptfs_readlink_lower() local
662 rc = ecryptfs_decode_and_decrypt_filename(&buf, bufsiz, dentry->d_sb, in ecryptfs_readlink_lower()
665 if (rc) in ecryptfs_readlink_lower()
666 return ERR_PTR(rc); in ecryptfs_readlink_lower()
739 int rc = 0; in truncate_upper() local
750 rc = ecryptfs_get_lower_file(dentry, inode); in truncate_upper()
751 if (rc) in truncate_upper()
752 return rc; in truncate_upper()
763 rc = ecryptfs_write(inode, zero, in truncate_upper()
784 rc = -ENOMEM; in truncate_upper()
787 rc = ecryptfs_write(inode, zeros_virt, in truncate_upper()
790 if (rc) { in truncate_upper()
793 "reducing truncate; rc = [%d]\n", rc); in truncate_upper()
798 rc = ecryptfs_write_inode_size_to_metadata(inode); in truncate_upper()
799 if (rc) { in truncate_upper()
802 "rc = [%d]\n", rc); in truncate_upper()
819 return rc; in truncate_upper()
858 int rc; in ecryptfs_truncate() local
860 rc = ecryptfs_inode_newsize_ok(d_inode(dentry), new_length); in ecryptfs_truncate()
861 if (rc) in ecryptfs_truncate()
862 return rc; in ecryptfs_truncate()
864 rc = truncate_upper(dentry, &ia, &lower_ia); in ecryptfs_truncate()
865 if (!rc && lower_ia.ia_valid & ATTR_SIZE) { in ecryptfs_truncate()
869 rc = notify_change(&nop_mnt_idmap, lower_dentry, in ecryptfs_truncate()
873 return rc; in ecryptfs_truncate()
900 int rc = 0; in ecryptfs_setattr() local
909 rc = ecryptfs_init_crypt_stat(crypt_stat); in ecryptfs_setattr()
910 if (rc) in ecryptfs_setattr()
911 return rc; in ecryptfs_setattr()
926 rc = ecryptfs_get_lower_file(dentry, inode); in ecryptfs_setattr()
927 if (rc) { in ecryptfs_setattr()
931 rc = ecryptfs_read_metadata(dentry); in ecryptfs_setattr()
933 if (rc) { in ecryptfs_setattr()
936 rc = -EIO; in ecryptfs_setattr()
945 rc = 0; in ecryptfs_setattr()
952 rc = setattr_prepare(&nop_mnt_idmap, dentry, ia); in ecryptfs_setattr()
953 if (rc) in ecryptfs_setattr()
956 rc = ecryptfs_inode_newsize_ok(inode, ia->ia_size); in ecryptfs_setattr()
957 if (rc) in ecryptfs_setattr()
965 rc = truncate_upper(dentry, ia, &lower_ia); in ecryptfs_setattr()
966 if (rc < 0) in ecryptfs_setattr()
978 rc = notify_change(&nop_mnt_idmap, lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
982 return rc; in ecryptfs_setattr()
991 int rc = 0; in ecryptfs_getattr_link() local
1005 rc = PTR_ERR(target); in ecryptfs_getattr_link()
1008 return rc; in ecryptfs_getattr_link()
1025 int rc; in ecryptfs_getattr() local
1027 rc = ecryptfs_do_getattr(ecryptfs_dentry_to_lower_path(dentry), in ecryptfs_getattr()
1029 if (!rc) { in ecryptfs_getattr()
1036 return rc; in ecryptfs_getattr()
1044 int rc; in ecryptfs_setxattr() local
1051 rc = -EOPNOTSUPP; in ecryptfs_setxattr()
1055 rc = __vfs_setxattr_locked(&nop_mnt_idmap, lower_dentry, name, value, size, flags, NULL); in ecryptfs_setxattr()
1057 if (!rc && inode) in ecryptfs_setxattr()
1060 return rc; in ecryptfs_setxattr()
1067 int rc; in ecryptfs_getxattr_lower() local
1070 rc = -EOPNOTSUPP; in ecryptfs_getxattr_lower()
1074 rc = __vfs_getxattr(lower_dentry, lower_inode, name, value, size); in ecryptfs_getxattr_lower()
1077 return rc; in ecryptfs_getxattr_lower()
1092 int rc = 0; in ecryptfs_listxattr() local
1097 rc = -EOPNOTSUPP; in ecryptfs_listxattr()
1101 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1104 return rc; in ecryptfs_listxattr()
1110 int rc; in ecryptfs_removexattr() local
1117 rc = -EOPNOTSUPP; in ecryptfs_removexattr()
1121 rc = __vfs_removexattr(&nop_mnt_idmap, lower_dentry, name); in ecryptfs_removexattr()
1124 return rc; in ecryptfs_removexattr()
1136 int rc; in ecryptfs_fileattr_set() local
1138 rc = vfs_fileattr_set(&nop_mnt_idmap, lower_dentry, fa); in ecryptfs_fileattr_set()
1141 return rc; in ecryptfs_fileattr_set()
1155 int rc; in ecryptfs_set_acl() local
1159 rc = vfs_set_acl(&nop_mnt_idmap, lower_dentry, in ecryptfs_set_acl()
1161 if (!rc) in ecryptfs_set_acl()
1163 return rc; in ecryptfs_set_acl()