Lines Matching refs:rc
149 int rc; in ecryptfs_do_unlink() local
153 rc = vfs_unlink(lower_dir_inode, lower_dentry, NULL); in ecryptfs_do_unlink()
154 if (rc) { in ecryptfs_do_unlink()
155 printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc); in ecryptfs_do_unlink()
165 return rc; in ecryptfs_do_unlink()
185 int rc; in ecryptfs_do_create() local
192 rc = vfs_create(d_inode(lower_dir_dentry), lower_dentry, mode, true); 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()
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()
270 int rc; in ecryptfs_create() local
277 rc = PTR_ERR(ecryptfs_inode); in ecryptfs_create()
282 rc = ecryptfs_initialize_file(ecryptfs_dentry, ecryptfs_inode); in ecryptfs_create()
283 if (rc) { in ecryptfs_create()
294 return rc; in ecryptfs_create()
300 int rc; in ecryptfs_i_size_read() local
302 rc = ecryptfs_get_lower_file(dentry, inode); in ecryptfs_i_size_read()
303 if (rc) { in ecryptfs_i_size_read()
307 dentry, rc); in ecryptfs_i_size_read()
308 return rc; in ecryptfs_i_size_read()
316 rc = ecryptfs_read_and_validate_header_region(inode); in ecryptfs_i_size_read()
318 if (rc) { in ecryptfs_i_size_read()
319 rc = ecryptfs_read_and_validate_xattr_region(dentry, inode); in ecryptfs_i_size_read()
320 if (!rc) in ecryptfs_i_size_read()
338 int rc = 0; in ecryptfs_lookup_interpose() local
369 rc = ecryptfs_i_size_read(dentry, inode); in ecryptfs_lookup_interpose()
370 if (rc) { in ecryptfs_lookup_interpose()
372 return rc; in ecryptfs_lookup_interpose()
380 return rc; in ecryptfs_lookup_interpose()
400 int rc = 0; in ecryptfs_lookup() local
409 rc = PTR_ERR(lower_dentry); in ecryptfs_lookup()
411 "[%d] on lower_dentry = [%pd]\n", __func__, rc, in ecryptfs_lookup()
423 rc = ecryptfs_encrypt_and_encode_filename( in ecryptfs_lookup()
427 if (rc) { in ecryptfs_lookup()
429 "filename; rc = [%d]\n", __func__, rc); in ecryptfs_lookup()
438 rc = PTR_ERR(lower_dentry); in ecryptfs_lookup()
440 "[%d] on lower_dentry = [%s]\n", __func__, rc, in ecryptfs_lookup()
445 rc = ecryptfs_lookup_interpose(ecryptfs_dentry, lower_dentry, in ecryptfs_lookup()
449 return ERR_PTR(rc); in ecryptfs_lookup()
459 int rc; in ecryptfs_link() local
467 rc = vfs_link(lower_old_dentry, d_inode(lower_dir_dentry), in ecryptfs_link()
469 if (rc || d_really_is_negative(lower_new_dentry)) in ecryptfs_link()
471 rc = ecryptfs_interpose(lower_new_dentry, new_dentry, dir->i_sb); in ecryptfs_link()
472 if (rc) in ecryptfs_link()
483 return rc; in ecryptfs_link()
494 int rc; in ecryptfs_symlink() local
506 rc = ecryptfs_encrypt_and_encode_filename(&encoded_symname, in ecryptfs_symlink()
511 if (rc) in ecryptfs_symlink()
513 rc = vfs_symlink(d_inode(lower_dir_dentry), lower_dentry, in ecryptfs_symlink()
516 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
518 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
519 if (rc) in ecryptfs_symlink()
528 return rc; in ecryptfs_symlink()
533 int rc; in ecryptfs_mkdir() local
539 rc = vfs_mkdir(d_inode(lower_dir_dentry), lower_dentry, mode); in ecryptfs_mkdir()
540 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mkdir()
542 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
543 if (rc) in ecryptfs_mkdir()
552 return rc; in ecryptfs_mkdir()
559 int rc; in ecryptfs_rmdir() local
565 rc = vfs_rmdir(d_inode(lower_dir_dentry), lower_dentry); in ecryptfs_rmdir()
567 if (!rc && d_really_is_positive(dentry)) in ecryptfs_rmdir()
572 if (!rc) in ecryptfs_rmdir()
575 return rc; in ecryptfs_rmdir()
581 int rc; in ecryptfs_mknod() local
587 rc = vfs_mknod(d_inode(lower_dir_dentry), lower_dentry, mode, dev); in ecryptfs_mknod()
588 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
590 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
591 if (rc) in ecryptfs_mknod()
599 return rc; in ecryptfs_mknod()
606 int rc; in ecryptfs_rename() local
624 rc = -EINVAL; in ecryptfs_rename()
629 rc = -ENOTEMPTY; in ecryptfs_rename()
632 rc = vfs_rename(d_inode(lower_old_dir_dentry), lower_old_dentry, in ecryptfs_rename()
635 if (rc) in ecryptfs_rename()
649 return rc; in ecryptfs_rename()
658 int rc; in ecryptfs_readlink_lower() local
665 rc = d_inode(lower_dentry)->i_op->readlink(lower_dentry, in ecryptfs_readlink_lower()
669 if (rc < 0) in ecryptfs_readlink_lower()
671 rc = ecryptfs_decode_and_decrypt_filename(&buf, bufsiz, dentry->d_sb, in ecryptfs_readlink_lower()
672 lower_buf, rc); in ecryptfs_readlink_lower()
675 return rc ? ERR_PTR(rc) : buf; in ecryptfs_readlink_lower()
740 int rc = 0; in truncate_upper() local
751 rc = ecryptfs_get_lower_file(dentry, inode); in truncate_upper()
752 if (rc) in truncate_upper()
753 return rc; in truncate_upper()
764 rc = ecryptfs_write(inode, zero, in truncate_upper()
785 rc = -ENOMEM; in truncate_upper()
788 rc = ecryptfs_write(inode, zeros_virt, in truncate_upper()
791 if (rc) { in truncate_upper()
794 "reducing truncate; rc = [%d]\n", rc); in truncate_upper()
799 rc = ecryptfs_write_inode_size_to_metadata(inode); in truncate_upper()
800 if (rc) { in truncate_upper()
803 "rc = [%d]\n", rc); in truncate_upper()
820 return rc; in truncate_upper()
859 int rc; in ecryptfs_truncate() local
861 rc = ecryptfs_inode_newsize_ok(d_inode(dentry), new_length); in ecryptfs_truncate()
862 if (rc) in ecryptfs_truncate()
863 return rc; in ecryptfs_truncate()
865 rc = truncate_upper(dentry, &ia, &lower_ia); in ecryptfs_truncate()
866 if (!rc && lower_ia.ia_valid & ATTR_SIZE) { in ecryptfs_truncate()
870 rc = notify_change(lower_dentry, &lower_ia, NULL); in ecryptfs_truncate()
873 return rc; in ecryptfs_truncate()
896 int rc = 0; in ecryptfs_setattr() local
919 rc = ecryptfs_get_lower_file(dentry, inode); in ecryptfs_setattr()
920 if (rc) { in ecryptfs_setattr()
924 rc = ecryptfs_read_metadata(dentry); in ecryptfs_setattr()
926 if (rc) { in ecryptfs_setattr()
929 rc = -EIO; in ecryptfs_setattr()
938 rc = 0; in ecryptfs_setattr()
945 rc = inode_change_ok(inode, ia); in ecryptfs_setattr()
946 if (rc) in ecryptfs_setattr()
949 rc = ecryptfs_inode_newsize_ok(inode, ia->ia_size); in ecryptfs_setattr()
950 if (rc) in ecryptfs_setattr()
958 rc = truncate_upper(dentry, ia, &lower_ia); in ecryptfs_setattr()
959 if (rc < 0) in ecryptfs_setattr()
971 rc = notify_change(lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
975 return rc; in ecryptfs_setattr()
982 int rc = 0; in ecryptfs_getattr_link() local
996 rc = PTR_ERR(target); in ecryptfs_getattr_link()
999 return rc; in ecryptfs_getattr_link()
1006 int rc; in ecryptfs_getattr() local
1008 rc = vfs_getattr(ecryptfs_dentry_to_lower_path(dentry), &lower_stat); in ecryptfs_getattr()
1009 if (!rc) { in ecryptfs_getattr()
1015 return rc; in ecryptfs_getattr()
1022 int rc = 0; in ecryptfs_setxattr() local
1027 rc = -EOPNOTSUPP; in ecryptfs_setxattr()
1031 rc = vfs_setxattr(lower_dentry, name, value, size, flags); in ecryptfs_setxattr()
1032 if (!rc && d_really_is_positive(dentry)) in ecryptfs_setxattr()
1035 return rc; in ecryptfs_setxattr()
1042 int rc = 0; in ecryptfs_getxattr_lower() local
1045 rc = -EOPNOTSUPP; in ecryptfs_getxattr_lower()
1049 rc = d_inode(lower_dentry)->i_op->getxattr(lower_dentry, name, value, in ecryptfs_getxattr_lower()
1053 return rc; in ecryptfs_getxattr_lower()
1067 int rc = 0; in ecryptfs_listxattr() local
1072 rc = -EOPNOTSUPP; in ecryptfs_listxattr()
1076 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1079 return rc; in ecryptfs_listxattr()
1084 int rc = 0; in ecryptfs_removexattr() local
1089 rc = -EOPNOTSUPP; in ecryptfs_removexattr()
1093 rc = d_inode(lower_dentry)->i_op->removexattr(lower_dentry, name); in ecryptfs_removexattr()
1096 return rc; in ecryptfs_removexattr()