Lines Matching refs:rc

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