Lines Matching refs:error
759 * Like filemap_add_folio, but error if expected item has gone.
768 int error;
780 error = mem_cgroup_charge(folio, charge_mm, gfp);
781 if (error) {
786 goto error;
816 error = xas_error(&xas);
817 goto error;
821 error:
824 return error;
834 int error;
837 error = shmem_replace_entry(mapping, folio->index, folio, radswap);
844 BUG_ON(error);
1175 int error;
1179 error = setattr_prepare(idmap, dentry, attr);
1180 if (error)
1181 return error;
1199 error = shmem_reacct_size(SHMEM_I(inode)->flags,
1201 if (error)
1202 return error;
1224 error = dquot_initialize(inode);
1225 if (error)
1226 return error;
1232 error = dquot_transfer(idmap, inode, attr);
1234 if (error)
1235 return error;
1240 error = posix_acl_chmod(idmap, dentry, inode->i_mode);
1241 if (!error && update_ctime) {
1247 return error;
1309 * swapin error entries can be found in the mapping. But they're
1331 * of pages swapped in, or the error in case of failure.
1338 int error = 0;
1346 error = shmem_swapin_folio(inode, indices[i],
1350 if (error == 0) {
1355 if (error == -ENOMEM)
1357 error = 0;
1359 return error ? error : ret;
1399 int error = 0;
1419 error = shmem_unuse_inode(&info->vfs_inode, type);
1428 if (error)
1433 return error;
1737 int error;
1769 error = shmem_replace_entry(swap_mapping, swap_index, old, new);
1770 if (!error) {
1779 if (unlikely(error)) {
1796 return error;
1816 * Don't treat swapin error folio as alloced. Otherwise inode->i_blocks
1828 * error code and NULL in *foliop.
1841 int error;
1870 error = -ENOMEM;
1880 error = -EEXIST;
1884 error = -EIO;
1896 error = shmem_replace_folio(&folio, gfp, info, index);
1897 if (error)
1901 error = shmem_add_to_page_cache(folio, mapping, index,
1904 if (error)
1921 error = -EEXIST;
1922 if (error == -EIO)
1931 return error;
1956 int error;
1980 error = shmem_swapin_folio(inode, index, &folio,
1982 if (error == -EEXIST)
1986 return error;
2042 error = PTR_ERR(folio);
2044 if (error != -ENOSPC)
2067 error = shmem_add_to_page_cache(folio, mapping, hindex,
2070 if (error)
2125 error = -EINVAL;
2148 if (error == -ENOSPC && !once++) {
2152 if (error == -EEXIST)
2154 return error;
2754 int error = 0;
2777 error = shmem_get_folio(inode, index, &folio, SGP_READ);
2778 if (error) {
2779 if (error == -EINVAL)
2780 error = 0;
2789 error = -EIO;
2855 error = -EFAULT;
2863 return retval ? retval : error;
2942 int error = 0;
2953 error = shmem_get_folio(inode, *ppos / PAGE_SIZE, &folio,
2955 if (error) {
2956 if (error == -EINVAL)
2957 error = 0;
2966 error = -EIO;
3020 return total_spliced ? total_spliced : error;
3051 int error;
3066 error = -EPERM;
3088 error = 0;
3093 error = inode_newsize_ok(inode, offset + len);
3094 if (error)
3098 error = -EPERM;
3106 error = -ENOSPC;
3136 error = -EINTR;
3138 error = -ENOMEM;
3140 error = shmem_get_folio(inode, index, &folio,
3142 if (error) {
3173 * can be recognized if we need to rollback on error later.
3191 if (!error)
3194 return error;
3229 int error;
3235 error = simple_acl_create(dir, inode);
3236 if (error)
3238 error = security_inode_init_security(inode, dir,
3241 if (error && error != -EOPNOTSUPP)
3244 error = simple_offset_add(shmem_get_offset_ctx(dir), dentry);
3245 if (error)
3253 return error;
3257 return error;
3265 int error;
3270 error = PTR_ERR(inode);
3274 error = security_inode_init_security(inode, dir,
3277 if (error && error != -EOPNOTSUPP)
3279 error = simple_acl_create(dir, inode);
3280 if (error)
3285 return finish_open_simple(file, error);
3288 return error;
3294 int error;
3296 error = shmem_mknod(idmap, dir, dentry, mode | S_IFDIR, 0);
3297 if (error)
3298 return error;
3381 int error;
3387 error = shmem_mknod(idmap, old_dir, whiteout,
3390 if (error)
3391 return error;
3417 int error;
3430 error = shmem_whiteout(idmap, old_dir, old_dentry);
3431 if (error)
3432 return error;
3436 error = simple_offset_add(shmem_get_offset_ctx(new_dir), old_dentry);
3437 if (error)
3438 return error;
3462 int error;
3477 error = security_inode_init_security(inode, dir, &dentry->d_name,
3479 if (error && error != -EOPNOTSUPP)
3482 error = simple_offset_add(shmem_get_offset_ctx(dir), dentry);
3483 if (error)
3490 error = -ENOMEM;
3496 error = shmem_get_folio(inode, 0, &folio, SGP_WRITE);
3497 if (error)
3518 return error;
3532 int error;
3544 error = shmem_get_folio(inode, 0, &folio, SGP_READ);
3545 if (error)
3546 return ERR_PTR(error);
4288 int error = -ENOMEM;
4294 return error;
4374 error = PTR_ERR(inode);
4386 return error;
4614 int error;
4619 error = register_quota_format(&shmem_quota_format);
4620 if (error < 0) {
4626 error = register_filesystem(&shmem_fs_type);
4627 if (error) {
4634 error = PTR_ERR(shm_mnt);
4655 shm_mnt = ERR_PTR(error);
4913 int error;
4916 error = shmem_get_folio_gfp(inode, index, &folio, SGP_CACHE,
4918 if (error)
4919 return ERR_PTR(error);