No need to check for ENOSPC because ntfs_log_perror() does it now

master
szaka 2007-07-08 20:45:14 +00:00
parent 4519f33eb5
commit c214b9c11c
3 changed files with 7 additions and 14 deletions

View File

@ -3489,9 +3489,7 @@ static int ntfs_attr_make_non_resident(ntfs_attr *na,
rl = ntfs_cluster_alloc(vol, 0, new_allocated_size >>
vol->cluster_size_bits, -1, DATA_ZONE);
if (!rl) {
if (errno != ENOSPC)
ntfs_log_trace("Eeek! Failed to allocate "
"cluster(s). Aborting...\n");
ntfs_log_perror("Failed to allocate clusters");
return -1;
}
} else
@ -4247,15 +4245,12 @@ retry:
ntfs_attr_put_search_ctx(ctx);
if (ntfs_inode_free_space(na->ni, mp_size -
cur_max_mp_size)) {
if (errno != ENOSPC)
return -1;
ntfs_log_error("Attribute list mapping "
"pairs size to big, "
ntfs_log_perror("Attribute list mapping"
" pairs size to big, "
"can't fit them in the "
"base MFT record. "
"Defragment volume and "
"try once again.\n");
errno = ENOSPC;
return -1;
}
goto retry;

View File

@ -87,10 +87,8 @@ static int ntfs_ib_write(ntfs_index_context *icx, VCN vcn, void *buf)
ret = ntfs_attr_mst_pwrite(icx->ia_na, ntfs_ib_vcn_to_pos(icx, vcn),
1, icx->block_size, buf);
if (ret != 1) {
if (errno != ENOSPC)
ntfs_log_perror("Failed to write index block %lld of "
"inode %llu", (long long)vcn,
(unsigned long long)icx->ni->mft_no);
ntfs_log_perror("Failed to write index block %lld, inode %llu",
(long long)vcn, (unsigned long long)icx->ni->mft_no);
return STATUS_ERROR;
}
@ -1222,7 +1220,7 @@ static int ntfs_ir_truncate(ntfs_index_context *icx, int data_size)
icx->ir->index.allocated_size = cpu_to_le32(data_size);
} else if (errno != ENOSPC)
} else
ntfs_log_perror("Failed to truncate INDEX_ROOT");
ntfs_attr_close(na);

View File

@ -742,7 +742,7 @@ static int ntfs_fuse_write(const char *org_path, const char *buf, size_t size,
}
while (size) {
res = ntfs_attr_pwrite(na, offset, size, buf);
if (res < (s64)size && errno != ENOSPC)
if (res < (s64)size)
ntfs_log_perror("ntfs_attr_pwrite partial write (%lld: "
"%lld <> %d)", (s64)offset, (s64)size, res);
if (res <= 0) {