Lines Matching refs:rc
72 int rc; in ecryptfs_create_underlying_file() local
78 rc = vfs_create(lower_dir_inode, lower_dentry, mode, nd); in ecryptfs_create_underlying_file()
81 return rc; in ecryptfs_create_underlying_file()
102 int rc; in ecryptfs_do_create() local
111 rc = PTR_ERR(lower_dir_dentry); in ecryptfs_do_create()
114 rc = ecryptfs_create_underlying_file(lower_dir_dentry->d_inode, in ecryptfs_do_create()
116 if (rc) { in ecryptfs_do_create()
118 "rc = [%d]\n", __func__, rc); in ecryptfs_do_create()
121 rc = ecryptfs_interpose(lower_dentry, ecryptfs_dentry, in ecryptfs_do_create()
123 if (rc) { in ecryptfs_do_create()
132 return rc; in ecryptfs_do_create()
147 int rc = 0; in grow_file() local
156 rc = ecryptfs_write(&fake_file, zero_virt, 0, 1); in grow_file()
158 rc = ecryptfs_write_inode_size_to_metadata(ecryptfs_inode); in grow_file()
161 return rc; in grow_file()
176 int rc = 0; in ecryptfs_initialize_file() local
185 rc = ecryptfs_new_file_context(ecryptfs_dentry); in ecryptfs_initialize_file()
186 if (rc) { in ecryptfs_initialize_file()
188 "context; rc = [%d]\n", rc); in ecryptfs_initialize_file()
192 rc = ecryptfs_init_persistent_file(ecryptfs_dentry); in ecryptfs_initialize_file()
193 if (rc) { in ecryptfs_initialize_file()
197 ecryptfs_dentry->d_name.name, rc); in ecryptfs_initialize_file()
201 rc = ecryptfs_write_metadata(ecryptfs_dentry); in ecryptfs_initialize_file()
202 if (rc) { in ecryptfs_initialize_file()
203 printk(KERN_ERR "Error writing headers; rc = [%d]\n", rc); in ecryptfs_initialize_file()
206 rc = grow_file(ecryptfs_dentry); in ecryptfs_initialize_file()
207 if (rc) in ecryptfs_initialize_file()
208 printk(KERN_ERR "Error growing file; rc = [%d]\n", rc); in ecryptfs_initialize_file()
210 return rc; in ecryptfs_initialize_file()
228 int rc; in ecryptfs_create() local
231 rc = ecryptfs_do_create(directory_inode, ecryptfs_dentry, mode, nd); in ecryptfs_create()
232 if (unlikely(rc)) { in ecryptfs_create()
239 rc = ecryptfs_initialize_file(ecryptfs_dentry); in ecryptfs_create()
241 return rc; in ecryptfs_create()
259 int rc = 0; in ecryptfs_lookup_and_interpose_lower() local
271 rc = -ENOMEM; in ecryptfs_lookup_and_interpose_lower()
284 rc = ecryptfs_interpose(lower_dentry, ecryptfs_dentry, in ecryptfs_lookup_and_interpose_lower()
286 if (rc) { in ecryptfs_lookup_and_interpose_lower()
288 __func__, rc); in ecryptfs_lookup_and_interpose_lower()
304 rc = -ENOMEM; in ecryptfs_lookup_and_interpose_lower()
308 rc = ecryptfs_init_persistent_file(ecryptfs_dentry); in ecryptfs_lookup_and_interpose_lower()
309 if (rc) { in ecryptfs_lookup_and_interpose_lower()
313 ecryptfs_dentry->d_name.name, rc); in ecryptfs_lookup_and_interpose_lower()
322 rc = ecryptfs_read_and_validate_header_region(page_virt, in ecryptfs_lookup_and_interpose_lower()
324 if (rc) { in ecryptfs_lookup_and_interpose_lower()
325 rc = ecryptfs_read_and_validate_xattr_region(page_virt, in ecryptfs_lookup_and_interpose_lower()
327 if (rc) { in ecryptfs_lookup_and_interpose_lower()
328 rc = 0; in ecryptfs_lookup_and_interpose_lower()
352 return rc; in ecryptfs_lookup_and_interpose_lower()
372 int rc = 0; in ecryptfs_lookup() local
386 rc = PTR_ERR(lower_dentry); in ecryptfs_lookup()
388 "lower_dentry = [%s]\n", __func__, rc, in ecryptfs_lookup()
400 rc = ecryptfs_encrypt_and_encode_filename( in ecryptfs_lookup()
404 if (rc) { in ecryptfs_lookup()
406 "filename; rc = [%d]\n", __func__, rc); in ecryptfs_lookup()
413 rc = PTR_ERR(lower_dentry); in ecryptfs_lookup()
415 "lower_dentry = [%s]\n", __func__, rc, in ecryptfs_lookup()
420 rc = ecryptfs_lookup_and_interpose_lower(ecryptfs_dentry, lower_dentry, in ecryptfs_lookup()
428 return ERR_PTR(rc); in ecryptfs_lookup()
438 int rc; in ecryptfs_link() local
446 rc = vfs_link(lower_old_dentry, lower_dir_dentry->d_inode, in ecryptfs_link()
448 if (rc || !lower_new_dentry->d_inode) in ecryptfs_link()
450 rc = ecryptfs_interpose(lower_new_dentry, new_dentry, dir->i_sb, 0); in ecryptfs_link()
451 if (rc) in ecryptfs_link()
465 return rc; in ecryptfs_link()
470 int rc = 0; in ecryptfs_unlink() local
476 rc = vfs_unlink(lower_dir_inode, lower_dentry); in ecryptfs_unlink()
477 if (rc) { in ecryptfs_unlink()
478 printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc); in ecryptfs_unlink()
488 return rc; in ecryptfs_unlink()
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(lower_dir_dentry->d_inode, lower_dentry, in ecryptfs_symlink()
516 if (rc || !lower_dentry->d_inode) in ecryptfs_symlink()
518 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0); 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(lower_dir_dentry->d_inode, lower_dentry, mode); in ecryptfs_mkdir()
540 if (rc || !lower_dentry->d_inode) in ecryptfs_mkdir()
542 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0); 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(lower_dir_dentry->d_inode, lower_dentry); in ecryptfs_rmdir()
567 if (!rc) 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(lower_dir_dentry->d_inode, lower_dentry, mode, dev); in ecryptfs_mknod()
588 if (rc || !lower_dentry->d_inode) in ecryptfs_mknod()
590 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0); in ecryptfs_mknod()
591 if (rc) in ecryptfs_mknod()
599 return rc; in ecryptfs_mknod()
606 int rc; in ecryptfs_rename() local
619 rc = vfs_rename(lower_old_dir_dentry->d_inode, lower_old_dentry, in ecryptfs_rename()
621 if (rc) in ecryptfs_rename()
632 return rc; in ecryptfs_rename()
644 int rc; in ecryptfs_readlink() local
648 rc = -EINVAL; in ecryptfs_readlink()
657 rc = -ENOMEM; in ecryptfs_readlink()
662 rc = lower_dentry->d_inode->i_op->readlink(lower_dentry, in ecryptfs_readlink()
666 if (rc >= 0) { in ecryptfs_readlink()
667 rc = ecryptfs_decode_and_decrypt_filename(&plaintext_name, in ecryptfs_readlink()
670 rc); in ecryptfs_readlink()
671 if (rc) { in ecryptfs_readlink()
674 rc); in ecryptfs_readlink()
677 rc = copy_to_user(buf, plaintext_name, plaintext_name_size); in ecryptfs_readlink()
678 if (rc) in ecryptfs_readlink()
679 rc = -EFAULT; in ecryptfs_readlink()
681 rc = plaintext_name_size; in ecryptfs_readlink()
688 return rc; in ecryptfs_readlink()
694 int len = PAGE_SIZE, rc; in ecryptfs_follow_link() local
700 rc = -ENOMEM; in ecryptfs_follow_link()
705 rc = dentry->d_inode->i_op->readlink(dentry, (char __user *)buf, len); in ecryptfs_follow_link()
707 if (rc < 0) in ecryptfs_follow_link()
710 buf[rc] = '\0'; in ecryptfs_follow_link()
711 rc = 0; in ecryptfs_follow_link()
717 return ERR_PTR(rc); in ecryptfs_follow_link()
770 int rc = 0; in ecryptfs_truncate() local
792 rc = -ENOMEM; in ecryptfs_truncate()
807 rc = ecryptfs_write(&fake_ecryptfs_file, zero, in ecryptfs_truncate()
822 rc = -ENOMEM; in ecryptfs_truncate()
825 rc = ecryptfs_write(&fake_ecryptfs_file, zeros_virt, in ecryptfs_truncate()
828 if (rc) { in ecryptfs_truncate()
831 "reducing truncate; rc = [%d]\n", rc); in ecryptfs_truncate()
836 rc = ecryptfs_write_inode_size_to_metadata(inode); in ecryptfs_truncate()
837 if (rc) { in ecryptfs_truncate()
840 "rc = [%d]\n", rc); in ecryptfs_truncate()
858 return rc; in ecryptfs_truncate()
881 int rc = 0; in ecryptfs_setattr() local
903 rc = ecryptfs_read_metadata(dentry); in ecryptfs_setattr()
904 if (rc) { in ecryptfs_setattr()
907 rc = -EIO; in ecryptfs_setattr()
916 rc = 0; in ecryptfs_setattr()
927 rc = ecryptfs_truncate(dentry, ia->ia_size); in ecryptfs_setattr()
932 if (rc < 0) in ecryptfs_setattr()
944 rc = notify_change(lower_dentry, ia); in ecryptfs_setattr()
948 return rc; in ecryptfs_setattr()
955 int rc = 0; in ecryptfs_setxattr() local
960 rc = -ENOSYS; in ecryptfs_setxattr()
964 rc = lower_dentry->d_inode->i_op->setxattr(lower_dentry, name, value, in ecryptfs_setxattr()
968 return rc; in ecryptfs_setxattr()
975 int rc = 0; in ecryptfs_getxattr_lower() local
978 rc = -ENOSYS; in ecryptfs_getxattr_lower()
982 rc = lower_dentry->d_inode->i_op->getxattr(lower_dentry, name, value, in ecryptfs_getxattr_lower()
986 return rc; in ecryptfs_getxattr_lower()
1000 int rc = 0; in ecryptfs_listxattr() local
1005 rc = -ENOSYS; in ecryptfs_listxattr()
1009 rc = lower_dentry->d_inode->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1012 return rc; in ecryptfs_listxattr()
1017 int rc = 0; in ecryptfs_removexattr() local
1022 rc = -ENOSYS; in ecryptfs_removexattr()
1026 rc = lower_dentry->d_inode->i_op->removexattr(lower_dentry, name); in ecryptfs_removexattr()
1029 return rc; in ecryptfs_removexattr()