diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-10-28 05:54:24 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-11-08 11:48:23 -0500 |
commit | 272e42b215c52d32e06bf035c1f6b70baa6716bd (patch) | |
tree | b09ad40176f53006d57669255991a42ee38eb488 /fs/xfs/xfs_trans.h | |
parent | b52a360b2aa1c59ba9970fb0f52bbb093fcc7a24 (diff) |
xfs: constify xfs_item_ops
The log item ops aren't nessecarily the biggest exploit vector, but marking
them const is easy enough. Also remove the unused xfs_item_ops_t typedef
while we're at it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trans.h')
-rw-r--r-- | fs/xfs/xfs_trans.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h index 603f3eb52041..3ae713c0abd9 100644 --- a/fs/xfs/xfs_trans.h +++ b/fs/xfs/xfs_trans.h | |||
@@ -326,7 +326,7 @@ typedef struct xfs_log_item { | |||
326 | struct xfs_log_item *); | 326 | struct xfs_log_item *); |
327 | /* buffer item iodone */ | 327 | /* buffer item iodone */ |
328 | /* callback func */ | 328 | /* callback func */ |
329 | struct xfs_item_ops *li_ops; /* function list */ | 329 | const struct xfs_item_ops *li_ops; /* function list */ |
330 | 330 | ||
331 | /* delayed logging */ | 331 | /* delayed logging */ |
332 | struct list_head li_cil; /* CIL pointers */ | 332 | struct list_head li_cil; /* CIL pointers */ |
@@ -341,7 +341,7 @@ typedef struct xfs_log_item { | |||
341 | { XFS_LI_IN_AIL, "IN_AIL" }, \ | 341 | { XFS_LI_IN_AIL, "IN_AIL" }, \ |
342 | { XFS_LI_ABORTED, "ABORTED" } | 342 | { XFS_LI_ABORTED, "ABORTED" } |
343 | 343 | ||
344 | typedef struct xfs_item_ops { | 344 | struct xfs_item_ops { |
345 | uint (*iop_size)(xfs_log_item_t *); | 345 | uint (*iop_size)(xfs_log_item_t *); |
346 | void (*iop_format)(xfs_log_item_t *, struct xfs_log_iovec *); | 346 | void (*iop_format)(xfs_log_item_t *, struct xfs_log_iovec *); |
347 | void (*iop_pin)(xfs_log_item_t *); | 347 | void (*iop_pin)(xfs_log_item_t *); |
@@ -352,7 +352,7 @@ typedef struct xfs_item_ops { | |||
352 | void (*iop_push)(xfs_log_item_t *); | 352 | void (*iop_push)(xfs_log_item_t *); |
353 | bool (*iop_pushbuf)(xfs_log_item_t *); | 353 | bool (*iop_pushbuf)(xfs_log_item_t *); |
354 | void (*iop_committing)(xfs_log_item_t *, xfs_lsn_t); | 354 | void (*iop_committing)(xfs_log_item_t *, xfs_lsn_t); |
355 | } xfs_item_ops_t; | 355 | }; |
356 | 356 | ||
357 | #define IOP_SIZE(ip) (*(ip)->li_ops->iop_size)(ip) | 357 | #define IOP_SIZE(ip) (*(ip)->li_ops->iop_size)(ip) |
358 | #define IOP_FORMAT(ip,vp) (*(ip)->li_ops->iop_format)(ip, vp) | 358 | #define IOP_FORMAT(ip,vp) (*(ip)->li_ops->iop_format)(ip, vp) |