aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_priv.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-03-23 11:47:38 +1100
committerAlex Elder <aelder@sgi.com>2010-05-19 09:58:10 -0500
commite6b1f27370fc67ac9868b2dbe2c22bc26952900e (patch)
tree69485365ff6b9f22a56bcfc4814b27b45622d6e9 /fs/xfs/xfs_log_priv.h
parent55b66332d0921146a914d5d75a7b870a65dc4938 (diff)
downloadkernel_samsung_smdk4412-e6b1f27370fc67ac9868b2dbe2c22bc26952900e.zip
kernel_samsung_smdk4412-e6b1f27370fc67ac9868b2dbe2c22bc26952900e.tar.gz
kernel_samsung_smdk4412-e6b1f27370fc67ac9868b2dbe2c22bc26952900e.tar.bz2
xfs: clean up xlog_write_adv_cnt
Replace the awkward xlog_write_adv_cnt with an inline helper that makes it more obvious that it's modifying it's paramters, and replace the use of an integer type for "ptr" with a real void pointer. Also move xlog_write_adv_cnt to xfs_log_priv.h as it will be used outside of xfs_log.c in the delayed logging series. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_log_priv.h')
-rw-r--r--fs/xfs/xfs_log_priv.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index fd02a18..2f2b5ca 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -449,6 +449,14 @@ extern void xlog_pack_data(xlog_t *log, xlog_in_core_t *iclog, int);
extern kmem_zone_t *xfs_log_ticket_zone;
+static inline void
+xlog_write_adv_cnt(void **ptr, int *len, int *off, size_t bytes)
+{
+ *ptr += bytes;
+ *len -= bytes;
+ *off += bytes;
+}
+
/*
* Unmount record type is used as a pseudo transaction type for the ticket.
* It's value must be outside the range of XFS_TRANS_* values.