Tao Ma
2009-Dec-23 06:31 UTC
[Ocfs2-devel] [PATCH] ocfs2/trivial: Use le16_to_cpu for a disk value in xattr.c
In ocfs2_value_metas_in_xattr_header, we should Use le16_to_cpu for ocfs2_extent_list.l_next_free_rec. Signed-off-by: Tao Ma <tao.ma at oracle.com> --- fs/ocfs2/xattr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index fe34190..8c0bfa2 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -6066,7 +6066,7 @@ static int ocfs2_value_metas_in_xattr_header(struct super_block *sb, * to the extent block, so just calculate a maximum record num. */ if (!xv->xr_list.l_tree_depth) - *num_recs += xv->xr_list.l_next_free_rec; + *num_recs += le16_to_cpu(xv->xr_list.l_next_free_rec); else *num_recs += ocfs2_clusters_for_bytes(sb, XATTR_SIZE_MAX); -- 1.5.5
Sunil Mushran
2009-Dec-23 18:48 UTC
[Ocfs2-devel] [PATCH] ocfs2/trivial: Use le16_to_cpu for a disk value in xattr.c
Ack. Tao Ma wrote:> In ocfs2_value_metas_in_xattr_header, we should Use > le16_to_cpu for ocfs2_extent_list.l_next_free_rec. > > Signed-off-by: Tao Ma <tao.ma at oracle.com> > --- > fs/ocfs2/xattr.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c > index fe34190..8c0bfa2 100644 > --- a/fs/ocfs2/xattr.c > +++ b/fs/ocfs2/xattr.c > @@ -6066,7 +6066,7 @@ static int ocfs2_value_metas_in_xattr_header(struct super_block *sb, > * to the extent block, so just calculate a maximum record num. > */ > if (!xv->xr_list.l_tree_depth) > - *num_recs += xv->xr_list.l_next_free_rec; > + *num_recs += le16_to_cpu(xv->xr_list.l_next_free_rec); > else > *num_recs += ocfs2_clusters_for_bytes(sb, > XATTR_SIZE_MAX); >
Reasonably Related Threads
- [PATCH 00/42] ocfs2: Add reflink file support. V2
- [PATCH 00/42] ocfs2: Add reflink file support. V1
- [PATCH 1/1] ocfs2: set gap to seperate entry and value when xattr in bucket
- [PATCH] ocfs2: Adjust rightmost path in ocfs2_add_branch.
- [PATCH 00/39] ocfs2: Add reflink file support. V3