• Home
  • Raw
  • Download

Lines Matching refs:err

326 	int err;  in ovl_statfs()  local
330 err = vfs_statfs(&path, buf); in ovl_statfs()
331 if (!err) { in ovl_statfs()
336 return err; in ovl_statfs()
533 int err; in ovl_parse_opt() local
677 err = ovl_parse_redirect_mode(config, config->redirect_mode); in ovl_parse_opt()
678 if (err) in ovl_parse_opt()
679 return err; in ovl_parse_opt()
787 int err; in ovl_workdir_create() local
801 err = -EEXIST; in ovl_workdir_create()
809 err = ovl_workdir_cleanup(dir, mnt, work, 0); in ovl_workdir_create()
811 if (err == -EINVAL) { in ovl_workdir_create()
812 work = ERR_PTR(err); in ovl_workdir_create()
818 err = ovl_mkdir_real(dir, &work, attr.ia_mode); in ovl_workdir_create()
819 if (err) in ovl_workdir_create()
823 err = -EINVAL; in ovl_workdir_create()
840 err = vfs_removexattr(&init_user_ns, work, in ovl_workdir_create()
842 if (err && err != -ENODATA && err != -EOPNOTSUPP) in ovl_workdir_create()
845 err = vfs_removexattr(&init_user_ns, work, in ovl_workdir_create()
847 if (err && err != -ENODATA && err != -EOPNOTSUPP) in ovl_workdir_create()
852 err = notify_change(&init_user_ns, work, &attr, NULL); in ovl_workdir_create()
854 if (err) in ovl_workdir_create()
857 err = PTR_ERR(work); in ovl_workdir_create()
868 ofs->config.workdir, name, -err); in ovl_workdir_create()
888 int err = -EINVAL; in ovl_mount_dir_noesc() local
894 err = kern_path(name, LOOKUP_FOLLOW, path); in ovl_mount_dir_noesc()
895 if (err) { in ovl_mount_dir_noesc()
896 pr_err("failed to resolve '%s': %i\n", name, err); in ovl_mount_dir_noesc()
899 err = -EINVAL; in ovl_mount_dir_noesc()
917 return err; in ovl_mount_dir_noesc()
922 int err = -ENOMEM; in ovl_mount_dir() local
927 err = ovl_mount_dir_noesc(tmp, path); in ovl_mount_dir()
929 if (!err && path->dentry->d_flags & DCACHE_OP_REAL) { in ovl_mount_dir()
933 err = -EINVAL; in ovl_mount_dir()
937 return err; in ovl_mount_dir()
944 int err = vfs_statfs(path, &statfs); in ovl_check_namelen() local
946 if (err) in ovl_check_namelen()
951 return err; in ovl_check_namelen()
958 int err; in ovl_lower_dir() local
960 err = ovl_mount_dir_noesc(name, path); in ovl_lower_dir()
961 if (err) in ovl_lower_dir()
962 return err; in ovl_lower_dir()
964 err = ovl_check_namelen(path, ofs, name); in ovl_lower_dir()
965 if (err) in ovl_lower_dir()
966 return err; in ovl_lower_dir()
1050 int err; in ovl_posix_acl_xattr_set() local
1058 err = -EOPNOTSUPP; in ovl_posix_acl_xattr_set()
1064 err = acl ? -EACCES : 0; in ovl_posix_acl_xattr_set()
1067 err = -EPERM; in ovl_posix_acl_xattr_set()
1083 err = ovl_setattr(&init_user_ns, dentry, &iattr); in ovl_posix_acl_xattr_set()
1084 if (err) in ovl_posix_acl_xattr_set()
1085 return err; in ovl_posix_acl_xattr_set()
1088 err = ovl_xattr_set(dentry, inode, handler->name, value, size, flags); in ovl_posix_acl_xattr_set()
1089 return err; in ovl_posix_acl_xattr_set()
1093 return err; in ovl_posix_acl_xattr_set()
1186 int err; in ovl_setup_trap() local
1189 err = PTR_ERR_OR_ZERO(trap); in ovl_setup_trap()
1190 if (err) { in ovl_setup_trap()
1191 if (err == -ELOOP) in ovl_setup_trap()
1193 return err; in ovl_setup_trap()
1223 int err; in ovl_get_upper() local
1225 err = ovl_mount_dir(ofs->config.upperdir, upperpath); in ovl_get_upper()
1226 if (err) in ovl_get_upper()
1232 err = -EINVAL; in ovl_get_upper()
1236 err = ovl_check_namelen(upperpath, ofs, ofs->config.upperdir); in ovl_get_upper()
1237 if (err) in ovl_get_upper()
1240 err = ovl_setup_trap(sb, upperpath->dentry, &upper_layer->trap, in ovl_get_upper()
1242 if (err) in ovl_get_upper()
1246 err = PTR_ERR(upper_mnt); in ovl_get_upper()
1273 err = ovl_report_in_use(ofs, "upperdir"); in ovl_get_upper()
1274 if (err) in ovl_get_upper()
1278 err = 0; in ovl_get_upper()
1280 return err; in ovl_get_upper()
1294 int err; in ovl_check_rename_whiteout() local
1299 err = PTR_ERR(temp); in ovl_check_rename_whiteout()
1304 err = PTR_ERR(dest); in ovl_check_rename_whiteout()
1312 err = ovl_do_rename(dir, temp, dir, dest, RENAME_WHITEOUT); in ovl_check_rename_whiteout()
1313 if (err) { in ovl_check_rename_whiteout()
1314 if (err == -EINVAL) in ovl_check_rename_whiteout()
1315 err = 0; in ovl_check_rename_whiteout()
1320 err = PTR_ERR(whiteout); in ovl_check_rename_whiteout()
1324 err = ovl_is_whiteout(whiteout); in ovl_check_rename_whiteout()
1327 if (err) in ovl_check_rename_whiteout()
1340 return err; in ovl_check_rename_whiteout()
1390 int err; in ovl_make_workdir() local
1392 err = mnt_want_write(mnt); in ovl_make_workdir()
1393 if (err) in ovl_make_workdir()
1394 return err; in ovl_make_workdir()
1397 err = PTR_ERR(workdir); in ovl_make_workdir()
1403 err = ovl_setup_trap(sb, ofs->workdir, &ofs->workdir_trap, "workdir"); in ovl_make_workdir()
1404 if (err) in ovl_make_workdir()
1413 err = ovl_check_d_type_supported(workpath); in ovl_make_workdir()
1414 if (err < 0) in ovl_make_workdir()
1417 d_type = err; in ovl_make_workdir()
1431 err = ovl_check_rename_whiteout(ofs->workdir); in ovl_make_workdir()
1432 if (err < 0) in ovl_make_workdir()
1435 rename_whiteout = err; in ovl_make_workdir()
1442 err = ovl_do_setxattr(ofs, ofs->workdir, OVL_XATTR_OPAQUE, "0", 1); in ovl_make_workdir()
1443 if (err) { in ovl_make_workdir()
1459 if (err == -EPERM && !ofs->config.userxattr) in ovl_make_workdir()
1461 err = 0; in ovl_make_workdir()
1474 err = -EINVAL; in ovl_make_workdir()
1483 err = ovl_create_volatile_dirty(ofs); in ovl_make_workdir()
1484 if (err < 0) { in ovl_make_workdir()
1508 return err; in ovl_make_workdir()
1514 int err; in ovl_get_workdir() local
1517 err = ovl_mount_dir(ofs->config.workdir, &workpath); in ovl_get_workdir()
1518 if (err) in ovl_get_workdir()
1521 err = -EINVAL; in ovl_get_workdir()
1536 err = ovl_report_in_use(ofs, "workdir"); in ovl_get_workdir()
1537 if (err) in ovl_get_workdir()
1541 err = ovl_setup_trap(sb, ofs->workbasedir, &ofs->workbasedir_trap, in ovl_get_workdir()
1543 if (err) in ovl_get_workdir()
1546 err = ovl_make_workdir(sb, ofs, &workpath); in ovl_get_workdir()
1551 return err; in ovl_get_workdir()
1559 int err; in ovl_get_indexdir() local
1561 err = mnt_want_write(mnt); in ovl_get_indexdir()
1562 if (err) in ovl_get_indexdir()
1563 return err; in ovl_get_indexdir()
1566 err = ovl_verify_origin(ofs, upperpath->dentry, in ovl_get_indexdir()
1568 if (err) { in ovl_get_indexdir()
1580 err = PTR_ERR(indexdir); in ovl_get_indexdir()
1585 err = ovl_setup_trap(sb, ofs->indexdir, &ofs->indexdir_trap, in ovl_get_indexdir()
1587 if (err) in ovl_get_indexdir()
1599 err = ovl_verify_set_fh(ofs, ofs->indexdir, in ovl_get_indexdir()
1602 if (err) in ovl_get_indexdir()
1605 err = ovl_verify_upper(ofs, ofs->indexdir, upperpath->dentry, in ovl_get_indexdir()
1607 if (err) in ovl_get_indexdir()
1611 if (!err) in ovl_get_indexdir()
1612 err = ovl_indexdir_cleanup(ofs); in ovl_get_indexdir()
1614 if (err || !ofs->indexdir) in ovl_get_indexdir()
1619 return err; in ovl_get_indexdir()
1663 int err; in ovl_get_fsid() local
1691 err = get_anon_bdev(&dev); in ovl_get_fsid()
1692 if (err) { in ovl_get_fsid()
1694 return err; in ovl_get_fsid()
1708 int err; in ovl_get_layers() local
1711 err = -ENOMEM; in ovl_get_layers()
1725 err = get_anon_bdev(&ofs->fs[0].pseudo_dev); in ovl_get_layers()
1726 if (err) { in ovl_get_layers()
1741 err = fsid = ovl_get_fsid(ofs, &stack[i]); in ovl_get_layers()
1742 if (err < 0) in ovl_get_layers()
1752 err = ovl_setup_trap(sb, stack[i].dentry, &trap, "lowerdir"); in ovl_get_layers()
1753 if (err) in ovl_get_layers()
1757 err = ovl_report_in_use(ofs, "lowerdir"); in ovl_get_layers()
1758 if (err) { in ovl_get_layers()
1765 err = PTR_ERR(mnt); in ovl_get_layers()
1819 err = 0; in ovl_get_layers()
1821 return err; in ovl_get_layers()
1828 int err; in ovl_get_lowerstack() local
1842 err = -EINVAL; in ovl_get_lowerstack()
1844 err = ovl_lower_dir(lower, &stack[i], ofs, &sb->s_stack_depth); in ovl_get_lowerstack()
1845 if (err) in ovl_get_lowerstack()
1851 err = -EINVAL; in ovl_get_lowerstack()
1858 err = ovl_get_layers(sb, ofs, stack, numlower, layers); in ovl_get_lowerstack()
1859 if (err) in ovl_get_lowerstack()
1862 err = -ENOMEM; in ovl_get_lowerstack()
1880 oe = ERR_PTR(err); in ovl_get_lowerstack()
1894 int err = 0; in ovl_check_layer() local
1902 while (!err && parent != next) { in ovl_check_layer()
1904 err = -ELOOP; in ovl_check_layer()
1907 err = ovl_report_in_use(ofs, name); in ovl_check_layer()
1916 return err; in ovl_check_layer()
1925 int i, err; in ovl_check_overlapping_layers() local
1928 err = ovl_check_layer(sb, ofs, ovl_upper_mnt(ofs)->mnt_root, in ovl_check_overlapping_layers()
1930 if (err) in ovl_check_overlapping_layers()
1931 return err; in ovl_check_overlapping_layers()
1940 err = ovl_check_layer(sb, ofs, ofs->workbasedir, "workdir", in ovl_check_overlapping_layers()
1942 if (err) in ovl_check_overlapping_layers()
1943 return err; in ovl_check_overlapping_layers()
1947 err = ovl_check_layer(sb, ofs, in ovl_check_overlapping_layers()
1950 if (err) in ovl_check_overlapping_layers()
1951 return err; in ovl_check_overlapping_layers()
2005 int err; in ovl_fill_super() local
2007 err = -EIO; in ovl_fill_super()
2013 err = -ENOMEM; in ovl_fill_super()
2018 err = -ENOMEM; in ovl_fill_super()
2031 err = ovl_parse_opt((char *) data, &ofs->config); in ovl_fill_super()
2032 if (err) in ovl_fill_super()
2035 err = -EINVAL; in ovl_fill_super()
2042 err = -ENOMEM; in ovl_fill_super()
2047 err = -EINVAL; in ovl_fill_super()
2055 err = -ENOMEM; in ovl_fill_super()
2082 err = -EINVAL; in ovl_fill_super()
2088 err = ovl_get_upper(sb, ofs, &layers[0], &upperpath); in ovl_fill_super()
2089 if (err) in ovl_fill_super()
2096 err = -EIO; in ovl_fill_super()
2102 err = ovl_get_workdir(sb, ofs, &upperpath); in ovl_fill_super()
2103 if (err) in ovl_fill_super()
2113 err = PTR_ERR(oe); in ovl_fill_super()
2127 err = ovl_get_indexdir(sb, ofs, oe, &upperpath); in ovl_fill_super()
2128 if (err) in ovl_fill_super()
2136 err = ovl_check_overlapping_layers(sb, ofs); in ovl_fill_super()
2137 if (err) in ovl_fill_super()
2167 err = -ENOMEM; in ovl_fill_super()
2186 return err; in ovl_fill_super()
2213 int err; in ovl_init() local
2223 err = ovl_aio_request_cache_init(); in ovl_init()
2224 if (!err) { in ovl_init()
2225 err = register_filesystem(&ovl_fs_type); in ovl_init()
2226 if (!err) in ovl_init()
2233 return err; in ovl_init()