ntfs: fix inconsistent indenting warnings
Detected by Smatch. ndex.c:2041 ntfs_index_walk_up() warn: inconsistent indenting mft.c:2462 ntfs_mft_record_alloc() warn: inconsistent indenting Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>master
parent
4e59f8a1a8
commit
068a35fd72
|
|
@ -2007,43 +2007,43 @@ struct index_entry *ntfs_index_walk_down(struct index_entry *ie, struct ntfs_ind
|
|||
static struct index_entry *ntfs_index_walk_up(struct index_entry *ie,
|
||||
struct ntfs_index_context *ictx)
|
||||
{
|
||||
struct index_entry *entry;
|
||||
struct index_entry *entry = ie;
|
||||
s64 vcn;
|
||||
|
||||
entry = ie;
|
||||
if (ictx->pindex > 0) {
|
||||
do {
|
||||
ictx->pindex--;
|
||||
if (!ictx->pindex) {
|
||||
/* we have reached the root */
|
||||
kfree(ictx->ib);
|
||||
ictx->ib = NULL;
|
||||
ictx->is_in_root = true;
|
||||
/* a new search context is to be allocated */
|
||||
if (ictx->actx)
|
||||
ntfs_attr_put_search_ctx(ictx->actx);
|
||||
ictx->ir = ntfs_ir_lookup(ictx->idx_ni, ictx->name,
|
||||
ictx->name_len, &ictx->actx);
|
||||
if (ictx->ir)
|
||||
entry = ntfs_ie_get_by_pos(&ictx->ir->index,
|
||||
ictx->parent_pos[ictx->pindex]);
|
||||
else
|
||||
entry = NULL;
|
||||
} else {
|
||||
/* up into non-root node */
|
||||
vcn = ictx->parent_vcn[ictx->pindex];
|
||||
if (!ntfs_ib_read(ictx, vcn, ictx->ib)) {
|
||||
entry = ntfs_ie_get_by_pos(&ictx->ib->index,
|
||||
ictx->parent_pos[ictx->pindex]);
|
||||
} else
|
||||
entry = NULL;
|
||||
}
|
||||
ictx->entry = entry;
|
||||
} while (entry && (ictx->pindex > 0) &&
|
||||
(entry->flags & INDEX_ENTRY_END));
|
||||
} else
|
||||
entry = NULL;
|
||||
if (ictx->pindex <= 0)
|
||||
return NULL;
|
||||
|
||||
do {
|
||||
ictx->pindex--;
|
||||
if (!ictx->pindex) {
|
||||
/* we have reached the root */
|
||||
kfree(ictx->ib);
|
||||
ictx->ib = NULL;
|
||||
ictx->is_in_root = true;
|
||||
/* a new search context is to be allocated */
|
||||
if (ictx->actx)
|
||||
ntfs_attr_put_search_ctx(ictx->actx);
|
||||
ictx->ir = ntfs_ir_lookup(ictx->idx_ni, ictx->name,
|
||||
ictx->name_len, &ictx->actx);
|
||||
if (ictx->ir)
|
||||
entry = ntfs_ie_get_by_pos(
|
||||
&ictx->ir->index,
|
||||
ictx->parent_pos[ictx->pindex]);
|
||||
else
|
||||
entry = NULL;
|
||||
} else {
|
||||
/* up into non-root node */
|
||||
vcn = ictx->parent_vcn[ictx->pindex];
|
||||
if (!ntfs_ib_read(ictx, vcn, ictx->ib)) {
|
||||
entry = ntfs_ie_get_by_pos(
|
||||
&ictx->ib->index,
|
||||
ictx->parent_pos[ictx->pindex]);
|
||||
} else
|
||||
entry = NULL;
|
||||
}
|
||||
ictx->entry = entry;
|
||||
} while (entry && (ictx->pindex > 0) &&
|
||||
(entry->flags & INDEX_ENTRY_END));
|
||||
return entry;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2459,7 +2459,7 @@ mft_rec_already_initialized:
|
|||
m->flags &= cpu_to_le16(
|
||||
~le16_to_cpu(MFT_RECORD_IN_USE));
|
||||
/* Make sure the mft record is written out to disk. */
|
||||
ntfs_mft_mark_dirty(folio);
|
||||
ntfs_mft_mark_dirty(folio);
|
||||
folio_unlock(folio);
|
||||
kunmap_local(m);
|
||||
folio_put(folio);
|
||||
|
|
|
|||
Loading…
Reference in New Issue