This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
commit 3fcc2f4af5c46e2aa69ac3fbfb7cf4d5bd932048
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu May 21 01:42:19 2020 +0100
libgfs2: No need to use gfs2_buffer_head in metapointer()
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/fs_ops.c | 6 +++---
gfs2/libgfs2/gfs1.c | 7 +++----
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/gfs2/libgfs2/fs_ops.c b/gfs2/libgfs2/fs_ops.c
index ee512f6..77648a1 100644
--- a/gfs2/libgfs2/fs_ops.c
+++ b/gfs2/libgfs2/fs_ops.c
@@ -15,14 +15,14 @@
#include "libgfs2.h"
#include "rgrp.h"
-static __inline__ uint64_t *metapointer(struct gfs2_buffer_head *bh,
+static __inline__ uint64_t *metapointer(char *buf,
unsigned int height,
struct metapath *mp)
{
unsigned int head_size = (height > 0) ?
sizeof(struct gfs2_meta_header) : sizeof(struct gfs2_dinode);
- return ((uint64_t *)(bh->b_data + head_size)) + mp->mp_list[height];
+ return ((uint64_t *)(buf + head_size)) + mp->mp_list[height];
}
/* Detect directory is a stuffed inode */
@@ -447,7 +447,7 @@ void lookup_block(struct gfs2_inode *ip, struct gfs2_buffer_head *bh,
unsigned int height, struct metapath *mp,
int create, int *new, uint64_t *block)
{
- uint64_t *ptr = metapointer(bh, height, mp);
+ uint64_t *ptr = metapointer(bh->b_data, height, mp);
if (*ptr) {
*block = be64_to_cpu(*ptr);
diff --git a/gfs2/libgfs2/gfs1.c b/gfs2/libgfs2/gfs1.c
index 29e4f12..da2a080 100644
--- a/gfs2/libgfs2/gfs1.c
+++ b/gfs2/libgfs2/gfs1.c
@@ -25,13 +25,12 @@ static __inline__ int fs_is_jdata(struct gfs2_inode *ip)
}
static __inline__ uint64_t *
-gfs1_metapointer(struct gfs2_buffer_head *bh, unsigned int height,
- struct metapath *mp)
+gfs1_metapointer(char *buf, unsigned int height, struct metapath *mp)
{
unsigned int head_size = (height > 0) ?
sizeof(struct gfs_indirect) : sizeof(struct gfs_dinode);
- return ((uint64_t *)(bh->b_data + head_size)) + mp->mp_list[height];
+ return ((uint64_t *)(buf + head_size)) + mp->mp_list[height];
}
int is_gfs_dir(struct gfs2_dinode *dinode)
@@ -45,7 +44,7 @@ void gfs1_lookup_block(struct gfs2_inode *ip, struct gfs2_buffer_head
*bh,
unsigned int height, struct metapath *mp,
int create, int *new, uint64_t *block)
{
- uint64_t *ptr = gfs1_metapointer(bh, height, mp);
+ uint64_t *ptr = gfs1_metapointer(bh->b_data, height, mp);
if (*ptr) {
*block = be64_to_cpu(*ptr);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.