]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
fat: move fat_i_pos_read to fat.h
authorNamjae Jeon <namjae.jeon@samsung.com>
Sat, 3 Nov 2012 00:43:00 +0000 (11:43 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Nov 2012 04:58:44 +0000 (15:58 +1100)
Originally, fat_i_pos_read() was a static inline function in inode.c.  The
static keyword was removed so that it could be accessed from other files.
However it is better to make it a static inline function in fat.h as
suggested by Ogawa.

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>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/fat/fat.h
fs/fat/inode.c

index 65f9149bed794144fbc8beeb093f584375b14f30..177e94e5127719fbfd1621a6bee57b7fe671c57f 100644 (file)
@@ -222,6 +222,20 @@ static inline void fat_get_blknr_offset(struct msdos_sb_info *sbi,
        *offset = i_pos & (sbi->dir_per_block - 1);
 }
 
+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 34253dc08aa303897c5bb068a7c78917991b20c8..63e08839984c946e71e82288ec76f67c9e67ee04 100644 (file)
@@ -595,20 +595,6 @@ static int fat_statfs(struct dentry *dentry, struct kstatfs *buf)
        return 0;
 }
 
-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;