Skip to content

Commit 3929042

Browse files
fs/ntfs3: Remove unused functions
Removed attr_must_be_resident and ntfs_query_def. Signed-off-by: Konstantin Komarov <[email protected]>
1 parent 9144b43 commit 3929042

File tree

3 files changed

+0
-58
lines changed

3 files changed

+0
-58
lines changed

fs/ntfs3/attrib.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -54,33 +54,6 @@ static inline u64 get_pre_allocated(u64 size)
5454
return ret;
5555
}
5656

57-
/*
58-
* attr_must_be_resident
59-
*
60-
* Return: True if attribute must be resident.
61-
*/
62-
static inline bool attr_must_be_resident(struct ntfs_sb_info *sbi,
63-
enum ATTR_TYPE type)
64-
{
65-
const struct ATTR_DEF_ENTRY *de;
66-
67-
switch (type) {
68-
case ATTR_STD:
69-
case ATTR_NAME:
70-
case ATTR_ID:
71-
case ATTR_LABEL:
72-
case ATTR_VOL_INFO:
73-
case ATTR_ROOT:
74-
case ATTR_EA_INFO:
75-
return true;
76-
default:
77-
de = ntfs_query_def(sbi, type);
78-
if (de && (de->flags & NTFS_ATTR_MUST_BE_RESIDENT))
79-
return true;
80-
return false;
81-
}
82-
}
83-
8457
/*
8558
* attr_load_runs - Load all runs stored in @attr.
8659
*/

fs/ntfs3/fsntfs.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -345,35 +345,6 @@ int ntfs_loadlog_and_replay(struct ntfs_inode *ni, struct ntfs_sb_info *sbi)
345345
return err;
346346
}
347347

348-
/*
349-
* ntfs_query_def
350-
*
351-
* Return: Current ATTR_DEF_ENTRY for given attribute type.
352-
*/
353-
const struct ATTR_DEF_ENTRY *ntfs_query_def(struct ntfs_sb_info *sbi,
354-
enum ATTR_TYPE type)
355-
{
356-
int type_in = le32_to_cpu(type);
357-
size_t min_idx = 0;
358-
size_t max_idx = sbi->def_entries - 1;
359-
360-
while (min_idx <= max_idx) {
361-
size_t i = min_idx + ((max_idx - min_idx) >> 1);
362-
const struct ATTR_DEF_ENTRY *entry = sbi->def_table + i;
363-
int diff = le32_to_cpu(entry->type) - type_in;
364-
365-
if (!diff)
366-
return entry;
367-
if (diff < 0)
368-
min_idx = i + 1;
369-
else if (i)
370-
max_idx = i - 1;
371-
else
372-
return NULL;
373-
}
374-
return NULL;
375-
}
376-
377348
/*
378349
* ntfs_look_for_free_space - Look for a free space in bitmap.
379350
*/

fs/ntfs3/ntfs_fs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,6 @@ int ntfs_fix_post_read(struct NTFS_RECORD_HEADER *rhdr, size_t bytes,
585585
bool simple);
586586
int ntfs_extend_init(struct ntfs_sb_info *sbi);
587587
int ntfs_loadlog_and_replay(struct ntfs_inode *ni, struct ntfs_sb_info *sbi);
588-
const struct ATTR_DEF_ENTRY *ntfs_query_def(struct ntfs_sb_info *sbi,
589-
enum ATTR_TYPE Type);
590588
int ntfs_look_for_free_space(struct ntfs_sb_info *sbi, CLST lcn, CLST len,
591589
CLST *new_lcn, CLST *new_len,
592590
enum ALLOCATE_OPT opt);

0 commit comments

Comments
 (0)