aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat/fat.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fat/fat.h')
-rw-r--r--fs/fat/fat.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/fat/fat.h b/fs/fat/fat.h
index f16948ed5bf8..980c0346c168 100644
--- a/fs/fat/fat.h
+++ b/fs/fat/fat.h
@@ -218,6 +218,13 @@ static inline sector_t fat_clus_to_blknr(struct msdos_sb_info *sbi, int clus)
+ sbi->data_start;
}
+static inline void fat_get_blknr_offset(struct msdos_sb_info *sbi,
+ loff_t i_pos, sector_t *blknr, int *offset)
+{
+ *blknr = i_pos >> sbi->dir_per_block_bits;
+ *offset = i_pos & (sbi->dir_per_block - 1);
+}
+
static inline loff_t fat_i_pos_read(struct msdos_sb_info *sbi,
struct inode *inode)
{