OSDN Git Service

xfs: const-ify xfs_owner_info arguments
[uclinux-h8/linux.git] / fs / xfs / libxfs / xfs_rmap.h
index 157dc72..6d32838 100644 (file)
@@ -52,7 +52,7 @@ xfs_rmap_skip_owner_update(
 
 static inline bool
 xfs_rmap_should_skip_owner_update(
-       struct xfs_owner_info   *oi)
+       const struct xfs_owner_info     *oi)
 {
        return oi->oi_owner == XFS_RMAP_OWN_NULL;
 }
@@ -103,12 +103,12 @@ xfs_rmap_irec_offset_unpack(
 
 static inline void
 xfs_owner_info_unpack(
-       struct xfs_owner_info   *oinfo,
-       uint64_t                *owner,
-       uint64_t                *offset,
-       unsigned int            *flags)
+       const struct xfs_owner_info     *oinfo,
+       uint64_t                        *owner,
+       uint64_t                        *offset,
+       unsigned int                    *flags)
 {
-       unsigned int            r = 0;
+       unsigned int                    r = 0;
 
        *owner = oinfo->oi_owner;
        *offset = oinfo->oi_offset;
@@ -137,10 +137,10 @@ xfs_owner_info_pack(
 
 int xfs_rmap_alloc(struct xfs_trans *tp, struct xfs_buf *agbp,
                   xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len,
-                  struct xfs_owner_info *oinfo);
+                  const struct xfs_owner_info *oinfo);
 int xfs_rmap_free(struct xfs_trans *tp, struct xfs_buf *agbp,
                  xfs_agnumber_t agno, xfs_agblock_t bno, xfs_extlen_t len,
-                 struct xfs_owner_info *oinfo);
+                 const struct xfs_owner_info *oinfo);
 
 int xfs_rmap_lookup_le(struct xfs_btree_cur *cur, xfs_agblock_t bno,
                xfs_extlen_t len, uint64_t owner, uint64_t offset,
@@ -218,10 +218,10 @@ int xfs_rmap_btrec_to_irec(union xfs_btree_rec *rec,
 int xfs_rmap_has_record(struct xfs_btree_cur *cur, xfs_agblock_t bno,
                xfs_extlen_t len, bool *exists);
 int xfs_rmap_record_exists(struct xfs_btree_cur *cur, xfs_agblock_t bno,
-               xfs_extlen_t len, struct xfs_owner_info *oinfo,
+               xfs_extlen_t len, const struct xfs_owner_info *oinfo,
                bool *has_rmap);
 int xfs_rmap_has_other_keys(struct xfs_btree_cur *cur, xfs_agblock_t bno,
-               xfs_extlen_t len, struct xfs_owner_info *oinfo,
+               xfs_extlen_t len, const struct xfs_owner_info *oinfo,
                bool *has_rmap);
 int xfs_rmap_map_raw(struct xfs_btree_cur *cur, struct xfs_rmap_irec *rmap);