]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/fat/fat.h
fat: move fat_i_pos_read to fat.h
[linux.git] / fs / fat / fat.h
index a7b1d86b37c7820b34116e346c369af9c13efb0f..f16948ed5bf84468cc8e61897a65ea73922d9231 100644 (file)
@@ -218,6 +218,20 @@ static inline sector_t fat_clus_to_blknr(struct msdos_sb_info *sbi, int clus)
                + sbi->data_start;
 }
 
+static inline loff_t fat_i_pos_read(struct msdos_sb_info *sbi,
+                                       struct inode *inode)
+{
+       loff_t i_pos;
+#if BITS_PER_LONG == 32
+       spin_lock(&sbi->inode_hash_lock);
+#endif
+       i_pos = MSDOS_I(inode)->i_pos;
+#if BITS_PER_LONG == 32
+       spin_unlock(&sbi->inode_hash_lock);
+#endif
+       return i_pos;
+}
+
 static inline void fat16_towchar(wchar_t *dst, const __u8 *src, size_t len)
 {
 #ifdef __BIG_ENDIAN