Skip to content

Commit 1404580

Browse files
Dr. David Alan Gilbertaalexandrovich
authored andcommitted
fs/ntfs3: Remove unused ntfs_sb_read
ntfs_sb_read() was added in 2021 by commit 82cae26 ("fs/ntfs3: Add initialization of super block") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
1 parent 1b998c4 commit 1404580

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

fs/ntfs3/fsntfs.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,34 +1035,6 @@ struct buffer_head *ntfs_bread(struct super_block *sb, sector_t block)
10351035
return NULL;
10361036
}
10371037

1038-
int ntfs_sb_read(struct super_block *sb, u64 lbo, size_t bytes, void *buffer)
1039-
{
1040-
struct block_device *bdev = sb->s_bdev;
1041-
u32 blocksize = sb->s_blocksize;
1042-
u64 block = lbo >> sb->s_blocksize_bits;
1043-
u32 off = lbo & (blocksize - 1);
1044-
u32 op = blocksize - off;
1045-
1046-
for (; bytes; block += 1, off = 0, op = blocksize) {
1047-
struct buffer_head *bh = __bread(bdev, block, blocksize);
1048-
1049-
if (!bh)
1050-
return -EIO;
1051-
1052-
if (op > bytes)
1053-
op = bytes;
1054-
1055-
memcpy(buffer, bh->b_data + off, op);
1056-
1057-
put_bh(bh);
1058-
1059-
bytes -= op;
1060-
buffer = Add2Ptr(buffer, op);
1061-
}
1062-
1063-
return 0;
1064-
}
1065-
10661038
int ntfs_sb_write(struct super_block *sb, u64 lbo, size_t bytes,
10671039
const void *buf, int wait)
10681040
{

fs/ntfs3/ntfs_fs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,6 @@ enum NTFS_DIRTY_FLAGS {
616616
NTFS_DIRTY_ERROR = 2,
617617
};
618618
int ntfs_set_state(struct ntfs_sb_info *sbi, enum NTFS_DIRTY_FLAGS dirty);
619-
int ntfs_sb_read(struct super_block *sb, u64 lbo, size_t bytes, void *buffer);
620619
int ntfs_sb_write(struct super_block *sb, u64 lbo, size_t bytes,
621620
const void *buffer, int wait);
622621
int ntfs_sb_write_run(struct ntfs_sb_info *sbi, const struct runs_tree *run,

0 commit comments

Comments
 (0)