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()
184 int rc; in ecryptfs_do_create() local
191 rc = vfs_create(d_inode(lower_dir_dentry), lower_dentry, mode, true); in ecryptfs_do_create()
192 if (rc) { in ecryptfs_do_create()
194 "rc = [%d]\n", __func__, rc); in ecryptfs_do_create()
195 inode = ERR_PTR(rc); in ecryptfs_do_create()
224 int rc = 0; in ecryptfs_initialize_file() local
232 rc = ecryptfs_new_file_context(ecryptfs_inode); in ecryptfs_initialize_file()
233 if (rc) { in ecryptfs_initialize_file()
235 "context; rc = [%d]\n", rc); in ecryptfs_initialize_file()
238 rc = ecryptfs_get_lower_file(ecryptfs_dentry, ecryptfs_inode); in ecryptfs_initialize_file()
239 if (rc) { in ecryptfs_initialize_file()
243 ecryptfs_dentry, rc); in ecryptfs_initialize_file()
246 rc = ecryptfs_write_metadata(ecryptfs_dentry, ecryptfs_inode); in ecryptfs_initialize_file()
247 if (rc) in ecryptfs_initialize_file()
248 printk(KERN_ERR "Error writing headers; rc = [%d]\n", rc); in ecryptfs_initialize_file()
251 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()
293 return rc; in ecryptfs_create()
299 int rc; in ecryptfs_i_size_read() local
301 rc = ecryptfs_get_lower_file(dentry, inode); in ecryptfs_i_size_read()
302 if (rc) { in ecryptfs_i_size_read()
306 dentry, rc); in ecryptfs_i_size_read()
307 return rc; in ecryptfs_i_size_read()
315 rc = ecryptfs_read_and_validate_header_region(inode); in ecryptfs_i_size_read()
317 if (rc) { in ecryptfs_i_size_read()
318 rc = ecryptfs_read_and_validate_xattr_region(dentry, inode); in ecryptfs_i_size_read()
319 if (!rc) in ecryptfs_i_size_read()
337 int rc = 0; in ecryptfs_lookup_interpose() local
368 rc = ecryptfs_i_size_read(dentry, inode); in ecryptfs_lookup_interpose()
369 if (rc) { in ecryptfs_lookup_interpose()
371 return rc; in ecryptfs_lookup_interpose()
379 return rc; in ecryptfs_lookup_interpose()
399 int rc = 0; in ecryptfs_lookup() local
408 rc = PTR_ERR(lower_dentry); in ecryptfs_lookup()
410 "[%d] on lower_dentry = [%pd]\n", __func__, rc, in ecryptfs_lookup()
422 rc = ecryptfs_encrypt_and_encode_filename( in ecryptfs_lookup()
426 if (rc) { in ecryptfs_lookup()
428 "filename; rc = [%d]\n", __func__, rc); in ecryptfs_lookup()
437 rc = PTR_ERR(lower_dentry); in ecryptfs_lookup()
439 "[%d] on lower_dentry = [%s]\n", __func__, rc, in ecryptfs_lookup()
444 rc = ecryptfs_lookup_interpose(ecryptfs_dentry, lower_dentry, in ecryptfs_lookup()
448 return ERR_PTR(rc); in ecryptfs_lookup()
458 int rc; in ecryptfs_link() local
466 rc = vfs_link(lower_old_dentry, d_inode(lower_dir_dentry), in ecryptfs_link()
468 if (rc || d_really_is_negative(lower_new_dentry)) in ecryptfs_link()
470 rc = ecryptfs_interpose(lower_new_dentry, new_dentry, dir->i_sb); in ecryptfs_link()
471 if (rc) in ecryptfs_link()
482 return rc; in ecryptfs_link()
493 int rc; in ecryptfs_symlink() local
505 rc = ecryptfs_encrypt_and_encode_filename(&encoded_symname, in ecryptfs_symlink()
510 if (rc) in ecryptfs_symlink()
512 rc = vfs_symlink(d_inode(lower_dir_dentry), lower_dentry, in ecryptfs_symlink()
515 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
517 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
518 if (rc) in ecryptfs_symlink()
527 return rc; in ecryptfs_symlink()
532 int rc; in ecryptfs_mkdir() local
538 rc = vfs_mkdir(d_inode(lower_dir_dentry), lower_dentry, mode); in ecryptfs_mkdir()
539 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mkdir()
541 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
542 if (rc) in ecryptfs_mkdir()
551 return rc; in ecryptfs_mkdir()
558 int rc; in ecryptfs_rmdir() local
564 rc = vfs_rmdir(d_inode(lower_dir_dentry), lower_dentry); in ecryptfs_rmdir()
566 if (!rc && d_really_is_positive(dentry)) in ecryptfs_rmdir()
571 if (!rc) in ecryptfs_rmdir()
574 return rc; in ecryptfs_rmdir()
580 int rc; in ecryptfs_mknod() local
586 rc = vfs_mknod(d_inode(lower_dir_dentry), lower_dentry, mode, dev); in ecryptfs_mknod()
587 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
589 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
590 if (rc) in ecryptfs_mknod()
598 return rc; in ecryptfs_mknod()
605 int rc; in ecryptfs_rename() local
623 rc = -EINVAL; in ecryptfs_rename()
628 rc = -ENOTEMPTY; in ecryptfs_rename()
631 rc = vfs_rename(d_inode(lower_old_dir_dentry), lower_old_dentry, in ecryptfs_rename()
634 if (rc) in ecryptfs_rename()
648 return rc; in ecryptfs_rename()
657 int rc; in ecryptfs_readlink_lower() local
664 rc = d_inode(lower_dentry)->i_op->readlink(lower_dentry, in ecryptfs_readlink_lower()
668 if (rc < 0) in ecryptfs_readlink_lower()
670 rc = ecryptfs_decode_and_decrypt_filename(&buf, bufsiz, dentry->d_sb, in ecryptfs_readlink_lower()
671 lower_buf, rc); in ecryptfs_readlink_lower()
674 return rc ? ERR_PTR(rc) : buf; in ecryptfs_readlink_lower()
737 int rc = 0; in truncate_upper() local
748 rc = ecryptfs_get_lower_file(dentry, inode); in truncate_upper()
749 if (rc) in truncate_upper()
750 return rc; in truncate_upper()
761 rc = ecryptfs_write(inode, zero, in truncate_upper()
782 rc = -ENOMEM; in truncate_upper()
785 rc = ecryptfs_write(inode, zeros_virt, in truncate_upper()
788 if (rc) { in truncate_upper()
791 "reducing truncate; rc = [%d]\n", rc); in truncate_upper()
796 rc = ecryptfs_write_inode_size_to_metadata(inode); in truncate_upper()
797 if (rc) { in truncate_upper()
800 "rc = [%d]\n", rc); in truncate_upper()
817 return rc; in truncate_upper()
856 int rc; in ecryptfs_truncate() local
858 rc = ecryptfs_inode_newsize_ok(d_inode(dentry), new_length); in ecryptfs_truncate()
859 if (rc) in ecryptfs_truncate()
860 return rc; in ecryptfs_truncate()
862 rc = truncate_upper(dentry, &ia, &lower_ia); in ecryptfs_truncate()
863 if (!rc && lower_ia.ia_valid & ATTR_SIZE) { in ecryptfs_truncate()
867 rc = notify_change(lower_dentry, &lower_ia, NULL); in ecryptfs_truncate()
870 return rc; in ecryptfs_truncate()
893 int rc = 0; in ecryptfs_setattr() local
916 rc = ecryptfs_get_lower_file(dentry, inode); in ecryptfs_setattr()
917 if (rc) { in ecryptfs_setattr()
921 rc = ecryptfs_read_metadata(dentry); in ecryptfs_setattr()
923 if (rc) { in ecryptfs_setattr()
926 rc = -EIO; in ecryptfs_setattr()
935 rc = 0; in ecryptfs_setattr()
942 rc = inode_change_ok(inode, ia); in ecryptfs_setattr()
943 if (rc) in ecryptfs_setattr()
946 rc = ecryptfs_inode_newsize_ok(inode, ia->ia_size); in ecryptfs_setattr()
947 if (rc) in ecryptfs_setattr()
955 rc = truncate_upper(dentry, ia, &lower_ia); in ecryptfs_setattr()
956 if (rc < 0) in ecryptfs_setattr()
968 rc = notify_change(lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
972 return rc; in ecryptfs_setattr()
979 int rc = 0; in ecryptfs_getattr_link() local
993 rc = PTR_ERR(target); in ecryptfs_getattr_link()
996 return rc; in ecryptfs_getattr_link()
1003 int rc; in ecryptfs_getattr() local
1005 rc = vfs_getattr(ecryptfs_dentry_to_lower_path(dentry), &lower_stat); in ecryptfs_getattr()
1006 if (!rc) { in ecryptfs_getattr()
1012 return rc; in ecryptfs_getattr()
1019 int rc = 0; in ecryptfs_setxattr() local
1024 rc = -EOPNOTSUPP; in ecryptfs_setxattr()
1028 rc = vfs_setxattr(lower_dentry, name, value, size, flags); in ecryptfs_setxattr()
1029 if (!rc && d_really_is_positive(dentry)) in ecryptfs_setxattr()
1032 return rc; in ecryptfs_setxattr()
1039 int rc = 0; in ecryptfs_getxattr_lower() local
1042 rc = -EOPNOTSUPP; in ecryptfs_getxattr_lower()
1046 rc = d_inode(lower_dentry)->i_op->getxattr(lower_dentry, name, value, in ecryptfs_getxattr_lower()
1050 return rc; in ecryptfs_getxattr_lower()
1064 int rc = 0; in ecryptfs_listxattr() local
1069 rc = -EOPNOTSUPP; in ecryptfs_listxattr()
1073 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1076 return rc; in ecryptfs_listxattr()
1081 int rc = 0; in ecryptfs_removexattr() local
1086 rc = -EOPNOTSUPP; in ecryptfs_removexattr()
1090 rc = d_inode(lower_dentry)->i_op->removexattr(lower_dentry, name); in ecryptfs_removexattr()
1093 return rc; in ecryptfs_removexattr()