diff options
author | Eric Sandeen <sandeen@redhat.com> | 2012-03-30 12:24:11 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-08-30 16:20:50 -0400 |
commit | 914ed44b17dc30ce0d783e8e23fce58a1a92412c (patch) | |
tree | 292c7c14d4c6952c8e12c09afd51ece7901cf5ed /fs | |
parent | 904c17e6832845cc651a4d5108a7d57eacdb61f7 (diff) |
Fix wrong flag ASSERT in xfs_attr_shortform_getvalue
This ASSERT is testing an if_flags flag value against
a di_aformat enum value. di_aformat is never assigned
XFS_IFINLINE.
This happens to work for now, because XFS_IFINLINE has
the same value as XFS_DINODE_FMT_LOCAL, and that's tested
just before we call this function.
However, I think the intention is to assert that we have
read in the data, i.e. XFS_IFINLINE on if_flags, before
we use if_data. This is done in other places through the
code as well.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_attr_leaf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c index 4dba2f9455f4..86db20a9cc02 100644 --- a/fs/xfs/xfs_attr_leaf.c +++ b/fs/xfs/xfs_attr_leaf.c | |||
@@ -626,7 +626,7 @@ xfs_attr_shortform_getvalue(xfs_da_args_t *args) | |||
626 | xfs_attr_sf_entry_t *sfe; | 626 | xfs_attr_sf_entry_t *sfe; |
627 | int i; | 627 | int i; |
628 | 628 | ||
629 | ASSERT(args->dp->i_d.di_aformat == XFS_IFINLINE); | 629 | ASSERT(args->dp->i_afp->if_flags == XFS_IFINLINE); |
630 | sf = (xfs_attr_shortform_t *)args->dp->i_afp->if_u1.if_data; | 630 | sf = (xfs_attr_shortform_t *)args->dp->i_afp->if_u1.if_data; |
631 | sfe = &sf->list[0]; | 631 | sfe = &sf->list[0]; |
632 | for (i = 0; i < sf->hdr.count; | 632 | for (i = 0; i < sf->hdr.count; |