• Home
  • Raw
  • Download

Lines Matching refs:rc

140 	int rc;  in ecryptfs_do_unlink()  local
142 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_do_unlink()
144 if (!rc) { in ecryptfs_do_unlink()
146 rc = -EINVAL; in ecryptfs_do_unlink()
148 rc = vfs_unlink(&init_user_ns, lower_dir, lower_dentry, in ecryptfs_do_unlink()
151 if (rc) { in ecryptfs_do_unlink()
152 printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc); in ecryptfs_do_unlink()
161 if (!rc) in ecryptfs_do_unlink()
163 return rc; in ecryptfs_do_unlink()
182 int rc; in ecryptfs_do_create() local
187 rc = lock_parent(ecryptfs_dentry, &lower_dentry, &lower_dir); in ecryptfs_do_create()
188 if (!rc) in ecryptfs_do_create()
189 rc = vfs_create(&init_user_ns, lower_dir, in ecryptfs_do_create()
191 if (rc) { in ecryptfs_do_create()
193 "rc = [%d]\n", __func__, rc); in ecryptfs_do_create()
194 inode = ERR_PTR(rc); in ecryptfs_do_create()
223 int rc = 0; in ecryptfs_initialize_file() local
231 rc = ecryptfs_new_file_context(ecryptfs_inode); in ecryptfs_initialize_file()
232 if (rc) { in ecryptfs_initialize_file()
234 "context; rc = [%d]\n", rc); in ecryptfs_initialize_file()
237 rc = ecryptfs_get_lower_file(ecryptfs_dentry, ecryptfs_inode); in ecryptfs_initialize_file()
238 if (rc) { in ecryptfs_initialize_file()
242 ecryptfs_dentry, rc); in ecryptfs_initialize_file()
245 rc = ecryptfs_write_metadata(ecryptfs_dentry, ecryptfs_inode); in ecryptfs_initialize_file()
246 if (rc) in ecryptfs_initialize_file()
247 printk(KERN_ERR "Error writing headers; rc = [%d]\n", rc); in ecryptfs_initialize_file()
250 return rc; in ecryptfs_initialize_file()
267 int rc; in ecryptfs_create() local
274 rc = PTR_ERR(ecryptfs_inode); in ecryptfs_create()
279 rc = ecryptfs_initialize_file(ecryptfs_dentry, ecryptfs_inode); in ecryptfs_create()
280 if (rc) { in ecryptfs_create()
288 return rc; in ecryptfs_create()
294 int rc; in ecryptfs_i_size_read() local
296 rc = ecryptfs_get_lower_file(dentry, inode); in ecryptfs_i_size_read()
297 if (rc) { in ecryptfs_i_size_read()
301 dentry, rc); in ecryptfs_i_size_read()
302 return rc; in ecryptfs_i_size_read()
310 rc = ecryptfs_read_and_validate_header_region(inode); in ecryptfs_i_size_read()
312 if (rc) { in ecryptfs_i_size_read()
313 rc = ecryptfs_read_and_validate_xattr_region(dentry, inode); in ecryptfs_i_size_read()
314 if (!rc) in ecryptfs_i_size_read()
331 int rc = 0; in ecryptfs_lookup_interpose() local
367 rc = ecryptfs_i_size_read(dentry, inode); in ecryptfs_lookup_interpose()
368 if (rc) { in ecryptfs_lookup_interpose()
370 return ERR_PTR(rc); in ecryptfs_lookup_interpose()
398 int rc = 0; in ecryptfs_lookup() local
405 rc = ecryptfs_encrypt_and_encode_filename( in ecryptfs_lookup()
408 if (rc) { in ecryptfs_lookup()
410 "filename; rc = [%d]\n", __func__, rc); in ecryptfs_lookup()
411 return ERR_PTR(rc); in ecryptfs_lookup()
437 int rc; in ecryptfs_link() local
441 rc = lock_parent(new_dentry, &lower_new_dentry, &lower_dir); in ecryptfs_link()
442 if (!rc) in ecryptfs_link()
443 rc = vfs_link(lower_old_dentry, &init_user_ns, lower_dir, in ecryptfs_link()
445 if (rc || d_really_is_negative(lower_new_dentry)) in ecryptfs_link()
447 rc = ecryptfs_interpose(lower_new_dentry, new_dentry, dir->i_sb); in ecryptfs_link()
448 if (rc) in ecryptfs_link()
457 return rc; in ecryptfs_link()
469 int rc; in ecryptfs_symlink() local
476 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_symlink()
477 if (rc) in ecryptfs_symlink()
481 rc = ecryptfs_encrypt_and_encode_filename(&encoded_symname, in ecryptfs_symlink()
485 if (rc) in ecryptfs_symlink()
487 rc = vfs_symlink(&init_user_ns, lower_dir, lower_dentry, in ecryptfs_symlink()
490 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
492 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
493 if (rc) in ecryptfs_symlink()
501 return rc; in ecryptfs_symlink()
507 int rc; in ecryptfs_mkdir() local
511 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mkdir()
512 if (!rc) in ecryptfs_mkdir()
513 rc = vfs_mkdir(&init_user_ns, lower_dir, in ecryptfs_mkdir()
515 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mkdir()
517 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
518 if (rc) in ecryptfs_mkdir()
527 return rc; in ecryptfs_mkdir()
534 int rc; in ecryptfs_rmdir() local
536 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_rmdir()
538 if (!rc) { in ecryptfs_rmdir()
540 rc = -EINVAL; in ecryptfs_rmdir()
542 rc = vfs_rmdir(&init_user_ns, lower_dir, lower_dentry); in ecryptfs_rmdir()
544 if (!rc) { in ecryptfs_rmdir()
551 if (!rc) in ecryptfs_rmdir()
553 return rc; in ecryptfs_rmdir()
560 int rc; in ecryptfs_mknod() local
564 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mknod()
565 if (!rc) in ecryptfs_mknod()
566 rc = vfs_mknod(&init_user_ns, lower_dir, in ecryptfs_mknod()
568 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
570 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
571 if (rc) in ecryptfs_mknod()
579 return rc; in ecryptfs_mknod()
587 int rc; in ecryptfs_rename() local
609 rc = -EINVAL; in ecryptfs_rename()
621 rc = -ENOTEMPTY; in ecryptfs_rename()
631 rc = vfs_rename(&rd); in ecryptfs_rename()
632 if (rc) in ecryptfs_rename()
643 return rc; in ecryptfs_rename()
652 int rc; in ecryptfs_readlink_lower() local
658 rc = ecryptfs_decode_and_decrypt_filename(&buf, bufsiz, dentry->d_sb, in ecryptfs_readlink_lower()
661 if (rc) in ecryptfs_readlink_lower()
662 return ERR_PTR(rc); in ecryptfs_readlink_lower()
735 int rc = 0; in truncate_upper() local
746 rc = ecryptfs_get_lower_file(dentry, inode); in truncate_upper()
747 if (rc) in truncate_upper()
748 return rc; in truncate_upper()
759 rc = ecryptfs_write(inode, zero, in truncate_upper()
780 rc = -ENOMEM; in truncate_upper()
783 rc = ecryptfs_write(inode, zeros_virt, in truncate_upper()
786 if (rc) { in truncate_upper()
789 "reducing truncate; rc = [%d]\n", rc); in truncate_upper()
794 rc = ecryptfs_write_inode_size_to_metadata(inode); in truncate_upper()
795 if (rc) { in truncate_upper()
798 "rc = [%d]\n", rc); in truncate_upper()
815 return rc; in truncate_upper()
854 int rc; in ecryptfs_truncate() local
856 rc = ecryptfs_inode_newsize_ok(d_inode(dentry), new_length); in ecryptfs_truncate()
857 if (rc) in ecryptfs_truncate()
858 return rc; in ecryptfs_truncate()
860 rc = truncate_upper(dentry, &ia, &lower_ia); in ecryptfs_truncate()
861 if (!rc && lower_ia.ia_valid & ATTR_SIZE) { in ecryptfs_truncate()
865 rc = notify_change(&init_user_ns, lower_dentry, in ecryptfs_truncate()
869 return rc; in ecryptfs_truncate()
896 int rc = 0; in ecryptfs_setattr() local
905 rc = ecryptfs_init_crypt_stat(crypt_stat); in ecryptfs_setattr()
906 if (rc) in ecryptfs_setattr()
907 return rc; in ecryptfs_setattr()
922 rc = ecryptfs_get_lower_file(dentry, inode); in ecryptfs_setattr()
923 if (rc) { in ecryptfs_setattr()
927 rc = ecryptfs_read_metadata(dentry); in ecryptfs_setattr()
929 if (rc) { in ecryptfs_setattr()
932 rc = -EIO; in ecryptfs_setattr()
941 rc = 0; in ecryptfs_setattr()
948 rc = setattr_prepare(&init_user_ns, dentry, ia); in ecryptfs_setattr()
949 if (rc) in ecryptfs_setattr()
952 rc = ecryptfs_inode_newsize_ok(inode, ia->ia_size); in ecryptfs_setattr()
953 if (rc) in ecryptfs_setattr()
961 rc = truncate_upper(dentry, ia, &lower_ia); in ecryptfs_setattr()
962 if (rc < 0) in ecryptfs_setattr()
974 rc = notify_change(&init_user_ns, lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
978 return rc; in ecryptfs_setattr()
987 int rc = 0; in ecryptfs_getattr_link() local
1001 rc = PTR_ERR(target); in ecryptfs_getattr_link()
1004 return rc; in ecryptfs_getattr_link()
1013 int rc; in ecryptfs_getattr() local
1015 rc = vfs_getattr(ecryptfs_dentry_to_lower_path(dentry), &lower_stat, in ecryptfs_getattr()
1017 if (!rc) { in ecryptfs_getattr()
1023 return rc; in ecryptfs_getattr()
1031 int rc; in ecryptfs_setxattr() local
1038 rc = -EOPNOTSUPP; in ecryptfs_setxattr()
1042 rc = __vfs_setxattr_locked(&init_user_ns, lower_dentry, name, value, size, flags, NULL); in ecryptfs_setxattr()
1044 if (!rc && inode) in ecryptfs_setxattr()
1047 return rc; in ecryptfs_setxattr()
1054 int rc; in ecryptfs_getxattr_lower() local
1057 rc = -EOPNOTSUPP; in ecryptfs_getxattr_lower()
1061 rc = __vfs_getxattr(lower_dentry, lower_inode, name, value, size); in ecryptfs_getxattr_lower()
1064 return rc; in ecryptfs_getxattr_lower()
1079 int rc = 0; in ecryptfs_listxattr() local
1084 rc = -EOPNOTSUPP; in ecryptfs_listxattr()
1088 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1091 return rc; in ecryptfs_listxattr()
1097 int rc; in ecryptfs_removexattr() local
1104 rc = -EOPNOTSUPP; in ecryptfs_removexattr()
1108 rc = __vfs_removexattr(&init_user_ns, lower_dentry, name); in ecryptfs_removexattr()
1111 return rc; in ecryptfs_removexattr()
1123 int rc; in ecryptfs_fileattr_set() local
1125 rc = vfs_fileattr_set(&init_user_ns, lower_dentry, fa); in ecryptfs_fileattr_set()
1128 return rc; in ecryptfs_fileattr_set()