cleanups (Szaka)
parent
942519d093
commit
57cc7904c9
|
@ -1490,7 +1490,7 @@ int ntfs_index_add_filename(ntfs_inode *ni, FILE_NAME_ATTR *fn, MFT_REF mref)
|
|||
{
|
||||
INDEX_ENTRY *ie;
|
||||
ntfs_index_context *icx;
|
||||
int fn_size, ie_size, ret = -1;
|
||||
int fn_size, ie_size, ret = -1, err;
|
||||
|
||||
ntfs_log_trace("Entering.\n");
|
||||
|
||||
|
@ -1517,7 +1517,9 @@ int ntfs_index_add_filename(ntfs_inode *ni, FILE_NAME_ATTR *fn, MFT_REF mref)
|
|||
if (!icx)
|
||||
goto out;
|
||||
|
||||
err = errno;
|
||||
ret = ntfs_ie_add(icx, ie);
|
||||
errno = err;
|
||||
|
||||
ntfs_index_ctx_put(icx);
|
||||
out:
|
||||
|
|
|
@ -594,8 +594,10 @@ static int ntfs_fuse_read(const char *org_path, char *buf, size_t size,
|
|||
while (size) {
|
||||
res = ntfs_attr_pread(na, offset, size, buf);
|
||||
if (res < (s64)size)
|
||||
ntfs_log_error("ntfs_attr_pread returned less bytes "
|
||||
"than requested.\n");
|
||||
ntfs_log_error("ntfs_attr_pread returned %d bytes "
|
||||
"instead of requested %lld bytes "
|
||||
"(offset %lld).\n", res,
|
||||
(long long)size, (long long)offset);
|
||||
if (res <= 0) {
|
||||
res = -errno;
|
||||
goto exit;
|
||||
|
@ -642,8 +644,10 @@ 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)
|
||||
ntfs_log_error("ntfs_attr_pwrite returned less bytes "
|
||||
"than requested.\n");
|
||||
ntfs_log_error("ntfs_attr_pwrite returned %d bytes "
|
||||
"instead of requested %lld bytes "
|
||||
"(offset %lld).\n", res,
|
||||
(long long)size, (long long)offset);
|
||||
if (res <= 0) {
|
||||
res = -errno;
|
||||
goto exit;
|
||||
|
|
Loading…
Reference in New Issue