]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fat: move fat_i_pos_read to fat.h
authorNamjae Jeon <namjae.jeon@samsung.com>
Wed, 20 Mar 2013 04:08:25 +0000 (15:08 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 21 Mar 2013 05:34:25 +0000 (16:34 +1100)
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>
fs/fat/fat.h
fs/fat/inode.c

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
index 93fbc8a7f0986a81ef7df9bb121573f6ff08a94d..78e363c844cbb989d48dbfc3e19925a2fa0c3dbd 100644 (file)
@@ -655,20 +655,6 @@ static int fat_statfs(struct dentry *dentry, struct kstatfs *buf)
        return 0;
 }
 
-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 int __fat_write_inode(struct inode *inode, int wait)
 {
        struct super_block *sb = inode->i_sb;