aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-04-28 08:29:01 -0400
committerAlex Elder <aelder@sgi.com>2010-05-19 10:58:20 -0400
commitb4ed4626a9775cd8cb77209280d24839526f94f2 (patch)
tree4269213c71d0e20d5c383c8a0947ce897cea8ac5 /fs/xfs
parentbd1556a146d46070049428dded306829cb65161d (diff)
xfs: mark xfs_iomap_write_ helpers static
And also drop a useless argument to xfs_iomap_write_direct. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_iomap.c20
-rw-r--r--fs/xfs/xfs_iomap.h6
2 files changed, 13 insertions, 13 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 7545dcdaa8aa..ef14943829da 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -55,6 +55,13 @@
55#define XFS_STRAT_WRITE_IMAPS 2 55#define XFS_STRAT_WRITE_IMAPS 2
56#define XFS_WRITE_IMAPS XFS_BMAP_MAX_NMAP 56#define XFS_WRITE_IMAPS XFS_BMAP_MAX_NMAP
57 57
58STATIC int xfs_iomap_write_direct(struct xfs_inode *, xfs_off_t, size_t,
59 int, struct xfs_bmbt_irec *, int *);
60STATIC int xfs_iomap_write_delay(struct xfs_inode *, xfs_off_t, size_t, int,
61 struct xfs_bmbt_irec *, int *);
62STATIC int xfs_iomap_write_allocate(struct xfs_inode *, xfs_off_t, size_t,
63 struct xfs_bmbt_irec *, int *);
64
58int 65int
59xfs_iomap( 66xfs_iomap(
60 struct xfs_inode *ip, 67 struct xfs_inode *ip,
@@ -133,7 +140,7 @@ xfs_iomap(
133 140
134 if (flags & (BMAPI_DIRECT|BMAPI_MMAP)) { 141 if (flags & (BMAPI_DIRECT|BMAPI_MMAP)) {
135 error = xfs_iomap_write_direct(ip, offset, count, flags, 142 error = xfs_iomap_write_direct(ip, offset, count, flags,
136 imap, nimaps, *nimaps); 143 imap, nimaps);
137 } else { 144 } else {
138 error = xfs_iomap_write_delay(ip, offset, count, flags, 145 error = xfs_iomap_write_delay(ip, offset, count, flags,
139 imap, nimaps); 146 imap, nimaps);
@@ -234,15 +241,14 @@ xfs_cmn_err_fsblock_zero(
234 return EFSCORRUPTED; 241 return EFSCORRUPTED;
235} 242}
236 243
237int 244STATIC int
238xfs_iomap_write_direct( 245xfs_iomap_write_direct(
239 xfs_inode_t *ip, 246 xfs_inode_t *ip,
240 xfs_off_t offset, 247 xfs_off_t offset,
241 size_t count, 248 size_t count,
242 int flags, 249 int flags,
243 xfs_bmbt_irec_t *ret_imap, 250 xfs_bmbt_irec_t *ret_imap,
244 int *nmaps, 251 int *nmaps)
245 int found)
246{ 252{
247 xfs_mount_t *mp = ip->i_mount; 253 xfs_mount_t *mp = ip->i_mount;
248 xfs_fileoff_t offset_fsb; 254 xfs_fileoff_t offset_fsb;
@@ -279,7 +285,7 @@ xfs_iomap_write_direct(
279 if (error) 285 if (error)
280 goto error_out; 286 goto error_out;
281 } else { 287 } else {
282 if (found && (ret_imap->br_startblock == HOLESTARTBLOCK)) 288 if (*nmaps && (ret_imap->br_startblock == HOLESTARTBLOCK))
283 last_fsb = MIN(last_fsb, (xfs_fileoff_t) 289 last_fsb = MIN(last_fsb, (xfs_fileoff_t)
284 ret_imap->br_blockcount + 290 ret_imap->br_blockcount +
285 ret_imap->br_startoff); 291 ret_imap->br_startoff);
@@ -434,7 +440,7 @@ xfs_iomap_eof_want_preallocate(
434 return 0; 440 return 0;
435} 441}
436 442
437int 443STATIC int
438xfs_iomap_write_delay( 444xfs_iomap_write_delay(
439 xfs_inode_t *ip, 445 xfs_inode_t *ip,
440 xfs_off_t offset, 446 xfs_off_t offset,
@@ -537,7 +543,7 @@ retry:
537 * We no longer bother to look at the incoming map - all we have to 543 * We no longer bother to look at the incoming map - all we have to
538 * guarantee is that whatever we allocate fills the required range. 544 * guarantee is that whatever we allocate fills the required range.
539 */ 545 */
540int 546STATIC int
541xfs_iomap_write_allocate( 547xfs_iomap_write_allocate(
542 xfs_inode_t *ip, 548 xfs_inode_t *ip,
543 xfs_off_t offset, 549 xfs_off_t offset,
diff --git a/fs/xfs/xfs_iomap.h b/fs/xfs/xfs_iomap.h
index 41e32d20a405..81ac4afd45b3 100644
--- a/fs/xfs/xfs_iomap.h
+++ b/fs/xfs/xfs_iomap.h
@@ -44,12 +44,6 @@ struct xfs_bmbt_irec;
44 44
45extern int xfs_iomap(struct xfs_inode *, xfs_off_t, ssize_t, int, 45extern int xfs_iomap(struct xfs_inode *, xfs_off_t, ssize_t, int,
46 struct xfs_bmbt_irec *, int *, int *); 46 struct xfs_bmbt_irec *, int *, int *);
47extern int xfs_iomap_write_direct(struct xfs_inode *, xfs_off_t, size_t,
48 int, struct xfs_bmbt_irec *, int *, int);
49extern int xfs_iomap_write_delay(struct xfs_inode *, xfs_off_t, size_t, int,
50 struct xfs_bmbt_irec *, int *);
51extern int xfs_iomap_write_allocate(struct xfs_inode *, xfs_off_t, size_t,
52 struct xfs_bmbt_irec *, int *);
53extern int xfs_iomap_write_unwritten(struct xfs_inode *, xfs_off_t, size_t); 47extern int xfs_iomap_write_unwritten(struct xfs_inode *, xfs_off_t, size_t);
54 48
55#endif /* __XFS_IOMAP_H__*/ 49#endif /* __XFS_IOMAP_H__*/