Renamed ntfs_index_entry_consistent() as ntfs_index_entry_inconsistent()
The original name was error prone when checking the condition.edge.strict_endians^2
parent
45141516d7
commit
a337c4c1eb
|
@ -141,7 +141,7 @@ extern void ntfs_index_ctx_reinit(ntfs_index_context *ictx);
|
|||
|
||||
extern int ntfs_index_block_inconsistent(const INDEX_BLOCK *ib, u32 block_size,
|
||||
u64 inum, VCN vcn);
|
||||
extern int ntfs_index_entry_consistent(const INDEX_ENTRY *ie,
|
||||
extern int ntfs_index_entry_inconsistent(const INDEX_ENTRY *ie,
|
||||
COLLATION_RULES collation_rule, u64 inum);
|
||||
extern int ntfs_index_lookup(const void *key, const int key_len,
|
||||
ntfs_index_context *ictx) __attribute_warn_unused_result__;
|
||||
|
|
|
@ -321,7 +321,7 @@ u64 ntfs_inode_lookup_by_name(ntfs_inode *dir_ni,
|
|||
break;
|
||||
|
||||
/* The file name must not overflow from the entry */
|
||||
if (ntfs_index_entry_consistent(ie, COLLATION_FILE_NAME,
|
||||
if (ntfs_index_entry_inconsistent(ie, COLLATION_FILE_NAME,
|
||||
dir_ni->mft_no)) {
|
||||
errno = EIO;
|
||||
goto put_err_out;
|
||||
|
@ -442,7 +442,7 @@ descend_into_child_node:
|
|||
break;
|
||||
|
||||
/* The file name must not overflow from the entry */
|
||||
if (ntfs_index_entry_consistent(ie, COLLATION_FILE_NAME,
|
||||
if (ntfs_index_entry_inconsistent(ie, COLLATION_FILE_NAME,
|
||||
dir_ni->mft_no)) {
|
||||
errno = EIO;
|
||||
goto close_err_out;
|
||||
|
@ -1247,7 +1247,7 @@ int ntfs_readdir(ntfs_inode *dir_ni, s64 *pos,
|
|||
continue;
|
||||
|
||||
/* The file name must not overflow from the entry */
|
||||
if (ntfs_index_entry_consistent(ie, COLLATION_FILE_NAME,
|
||||
if (ntfs_index_entry_inconsistent(ie, COLLATION_FILE_NAME,
|
||||
dir_ni->mft_no)) {
|
||||
errno = EIO;
|
||||
goto dir_err_out;
|
||||
|
@ -1389,7 +1389,7 @@ find_next_index_buffer:
|
|||
continue;
|
||||
|
||||
/* The file name must not overflow from the entry */
|
||||
if (ntfs_index_entry_consistent(ie, COLLATION_FILE_NAME,
|
||||
if (ntfs_index_entry_inconsistent(ie, COLLATION_FILE_NAME,
|
||||
dir_ni->mft_no)) {
|
||||
errno = EIO;
|
||||
goto dir_err_out;
|
||||
|
|
|
@ -522,7 +522,7 @@ int ntfs_index_block_inconsistent(const INDEX_BLOCK *ib, u32 block_size,
|
|||
* -1 otherwise (with errno unchanged)
|
||||
*/
|
||||
|
||||
int ntfs_index_entry_consistent(const INDEX_ENTRY *ie,
|
||||
int ntfs_index_entry_inconsistent(const INDEX_ENTRY *ie,
|
||||
COLLATION_RULES collation_rule, u64 inum)
|
||||
{
|
||||
int ret;
|
||||
|
@ -614,7 +614,7 @@ static int ntfs_ie_lookup(const void *key, const int key_len,
|
|||
return STATUS_ERROR;
|
||||
}
|
||||
/* Make sure key and data do not overflow from entry */
|
||||
if (ntfs_index_entry_consistent(ie, icx->ir->collation_rule,
|
||||
if (ntfs_index_entry_inconsistent(ie, icx->ir->collation_rule,
|
||||
icx->ni->mft_no)) {
|
||||
errno = EIO;
|
||||
return STATUS_ERROR;
|
||||
|
|
Loading…
Reference in New Issue