diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2013-04-30 03:21:09 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 05:28:40 +0400 |
commit | f21735d5873ad6c0d71fc15ebbbeda9ef445009b (patch) | |
tree | 6b96d31f978a069572b9aa99d169de3f3799fcca /fs/fat/fat.h | |
parent | 2628b7a6ac0d7d8246b6781a3e4489d78391ab54 (diff) | |
download | linux-f21735d5873ad6c0d71fc15ebbbeda9ef445009b.tar.xz |
fat: move fat_i_pos_read to fat.h
Move fat_i_pos_read to fat.h so that it can be called from nfs.c in the
subsequent patches to encode the file handle.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ravishankar N <ravi.n1@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fat/fat.h')
-rw-r--r-- | fs/fat/fat.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/fat/fat.h b/fs/fat/fat.h index a7b1d86b37c7..f16948ed5bf8 100644 --- a/fs/fat/fat.h +++ b/fs/fat/fat.h @@ -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 |