Commit 5683f53e36235234f7861909fdff878ff1f1bb20
Committed by
Alex Elder
1 parent
e82fa0c7ca
Exists in
master
and in
7 other branches
xfs: uninline xfs_get_extsz_hint
This function is too large to efficiently be inlined. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Showing 2 changed files with 23 additions and 21 deletions Side-by-side Diff
fs/xfs/xfs_rw.c
... | ... | @@ -336,4 +336,26 @@ |
336 | 336 | } |
337 | 337 | return (error); |
338 | 338 | } |
339 | + | |
340 | +/* | |
341 | + * helper function to extract extent size hint from inode | |
342 | + */ | |
343 | +xfs_extlen_t | |
344 | +xfs_get_extsz_hint( | |
345 | + struct xfs_inode *ip) | |
346 | +{ | |
347 | + xfs_extlen_t extsz; | |
348 | + | |
349 | + if (unlikely(XFS_IS_REALTIME_INODE(ip))) { | |
350 | + extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) | |
351 | + ? ip->i_d.di_extsize | |
352 | + : ip->i_mount->m_sb.sb_rextsize; | |
353 | + ASSERT(extsz); | |
354 | + } else { | |
355 | + extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) | |
356 | + ? ip->i_d.di_extsize : 0; | |
357 | + } | |
358 | + | |
359 | + return extsz; | |
360 | +} |
fs/xfs/xfs_rw.h
... | ... | @@ -37,27 +37,6 @@ |
37 | 37 | } |
38 | 38 | |
39 | 39 | /* |
40 | - * helper function to extract extent size hint from inode | |
41 | - */ | |
42 | -STATIC_INLINE xfs_extlen_t | |
43 | -xfs_get_extsz_hint( | |
44 | - xfs_inode_t *ip) | |
45 | -{ | |
46 | - xfs_extlen_t extsz; | |
47 | - | |
48 | - if (unlikely(XFS_IS_REALTIME_INODE(ip))) { | |
49 | - extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) | |
50 | - ? ip->i_d.di_extsize | |
51 | - : ip->i_mount->m_sb.sb_rextsize; | |
52 | - ASSERT(extsz); | |
53 | - } else { | |
54 | - extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) | |
55 | - ? ip->i_d.di_extsize : 0; | |
56 | - } | |
57 | - return extsz; | |
58 | -} | |
59 | - | |
60 | -/* | |
61 | 40 | * Prototypes for functions in xfs_rw.c. |
62 | 41 | */ |
63 | 42 | extern int xfs_write_clear_setuid(struct xfs_inode *ip); |
... | ... | @@ -69,6 +48,7 @@ |
69 | 48 | struct xfs_buf **bpp); |
70 | 49 | extern void xfs_ioerror_alert(char *func, struct xfs_mount *mp, |
71 | 50 | xfs_buf_t *bp, xfs_daddr_t blkno); |
51 | +extern xfs_extlen_t xfs_get_extsz_hint(struct xfs_inode *ip); | |
72 | 52 | |
73 | 53 | #endif /* __XFS_RW_H__ */ |