diff options
author | Dave Chinner <dchinner@redhat.com> | 2012-04-23 15:59:01 +1000 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-05-14 16:20:57 -0500 |
commit | fd50092c08068b5bc5d170bc17894db584aaf7b2 (patch) | |
tree | 0d2abe20735bf44e88727ec074fa55a298dc086d /fs/xfs | |
parent | 4ecbfe637cbcc0f093d1f295ef483f4e31e3987b (diff) | |
download | linux-exynos-fd50092c08068b5bc5d170bc17894db584aaf7b2.tar.gz linux-exynos-fd50092c08068b5bc5d170bc17894db584aaf7b2.tar.bz2 linux-exynos-fd50092c08068b5bc5d170bc17894db584aaf7b2.zip |
xfs: move xfs_fsb_to_db to xfs_bmap.h
This is the only remaining useful function in xfs_rw.h, so move it
to a header file responsible for block mapping functions that the
callers already include. Soon we can get rid of xfs_rw.h.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_bmap.c | 13 | ||||
-rw-r--r-- | fs/xfs/xfs_bmap.h | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_rw.h | 14 |
3 files changed, 16 insertions, 14 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index e74cfaf52248..7431381751ec 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -6169,3 +6169,16 @@ next_block: return error; } + +/* + * Convert the given file system block to a disk block. We have to treat it + * differently based on whether the file is a real time file or not, because the + * bmap code does. + */ +xfs_daddr_t +xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb) +{ + return (XFS_IS_REALTIME_INODE(ip) ? \ + (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \ + XFS_FSB_TO_DADDR((ip)->i_mount, (fsb))); +} diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h index 89ee672d378a..803b56d7ce16 100644 --- a/fs/xfs/xfs_bmap.h +++ b/fs/xfs/xfs_bmap.h @@ -211,6 +211,9 @@ int xfs_bmap_count_blocks(struct xfs_trans *tp, struct xfs_inode *ip, int whichfork, int *count); int xfs_bmap_punch_delalloc_range(struct xfs_inode *ip, xfs_fileoff_t start_fsb, xfs_fileoff_t length); + +xfs_daddr_t xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb); + #endif /* __KERNEL__ */ #endif /* __XFS_BMAP_H__ */ diff --git a/fs/xfs/xfs_rw.h b/fs/xfs/xfs_rw.h index 967b3a4b76ab..13f631732da1 100644 --- a/fs/xfs/xfs_rw.h +++ b/fs/xfs/xfs_rw.h @@ -23,20 +23,6 @@ struct xfs_inode; struct xfs_mount; /* - * Convert the given file system block to a disk block. - * We have to treat it differently based on whether the - * file is a real time file or not, because the bmap code - * does. - */ -static inline xfs_daddr_t -xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb) -{ - return (XFS_IS_REALTIME_INODE(ip) ? \ - (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \ - XFS_FSB_TO_DADDR((ip)->i_mount, (fsb))); -} - -/* * Prototypes for functions in xfs_rw.c. */ extern xfs_extlen_t xfs_get_extsz_hint(struct xfs_inode *ip); |