From 561cb42743a1345193ef0c2dbc66529b21a39095 Mon Sep 17 00:00:00 2001 From: uvman Date: Sun, 29 Oct 2006 00:55:45 +0000 Subject: [PATCH] Move ntfs_index_entry_mark_dirty() from index.h to index.c. (Szaka) --- ChangeLog | 3 ++- include/ntfs/index.h | 22 +--------------------- libntfs/index.c | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28774ef5..16e86185 100644 --- a/ChangeLog +++ b/ChangeLog @@ -54,7 +54,7 @@ xx/xx/2006 - x.xx.x - . - Fix GUID to string conversion. (Anton) - Fix some byte-order conversion for u32 variables that used le16 conversion macros. (zhanglinbao, Yuval) - - Spelling mistake fixes in debug logging strings. (Yuval) + - Spelling mistake fixes. (Yuval) - Remove inline keywords from static non-one-liners. (Szaka, Yuval) - Memory leak fixes. (Yura, Yuval) - Use memmove() in compress.c for moving overlapping blocks instead @@ -62,6 +62,7 @@ xx/xx/2006 - x.xx.x - . - Change ntfs_collate()'s signature to take size_t's. (Yuval) - Move ntfs_is_collation_rule_supported() from collate.h to collate.c and rewrite it to be clearer. (Yuval) + - Move ntfs_index_entry_mark_dirty() to index.c. (Szaka) 21/06/2006 - 1.13.1 - Various fixes. diff --git a/include/ntfs/index.h b/include/ntfs/index.h index 7de05e60..75e23e2a 100644 --- a/include/ntfs/index.h +++ b/include/ntfs/index.h @@ -126,26 +126,6 @@ extern char *ntfs_ie_filename_get(INDEX_ENTRY *ie); extern void ntfs_ie_filename_dump(INDEX_ENTRY *ie); extern void ntfs_ih_filename_dump(INDEX_HEADER *ih); -/** - * ntfs_index_entry_mark_dirty - mark an index entry dirty - * @ictx: ntfs index context describing the index entry - * - * Mark the index entry described by the index entry context @ictx dirty. - * - * If the index entry is in the index root attribute, simply mark the inode - * containing the index root attribute dirty. This ensures the mftrecord, and - * hence the index root attribute, will be written out to disk later. - * - * If the index entry is in an index block belonging to the index allocation - * attribute, set ib_dirty to TRUE, thus index block will be updated during - * ntfs_index_ctx_put. - */ -static inline void ntfs_index_entry_mark_dirty(ntfs_index_context *ictx) -{ - if (ictx->is_in_root) - ntfs_inode_mark_dirty(ictx->actx->ntfs_ino); - else - ictx->ib_dirty = TRUE; -} +extern void ntfs_index_entry_mark_dirty(ntfs_index_context *ictx); #endif /* _NTFS_INDEX_H */ diff --git a/libntfs/index.c b/libntfs/index.c index 8b301f31..90d2c5cd 100644 --- a/libntfs/index.c +++ b/libntfs/index.c @@ -46,6 +46,28 @@ #include "bitmap.h" #include "support.h" +/** + * ntfs_index_entry_mark_dirty - mark an index entry dirty + * @ictx: ntfs index context describing the index entry + * + * Mark the index entry described by the index entry context @ictx dirty. + * + * If the index entry is in the index root attribute, simply mark the inode + * containing the index root attribute dirty. This ensures the mftrecord, and + * hence the index root attribute, will be written out to disk later. + * + * If the index entry is in an index block belonging to the index allocation + * attribute, set ib_dirty to TRUE, thus index block will be updated during + * ntfs_index_ctx_put. + */ +void ntfs_index_entry_mark_dirty(ntfs_index_context *ictx) +{ + if (ictx->is_in_root) + ntfs_inode_mark_dirty(ictx->actx->ntfs_ino); + else + ictx->ib_dirty = TRUE; +} + static s64 ntfs_ib_vcn_to_pos(ntfs_index_context *icx, VCN vcn) { return vcn << icx->vcn_size_bits;