]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: Add xfs_has_attr and subroutines
authorAllison Collins <allison.henderson@oracle.com>
Tue, 15 Sep 2020 19:59:36 +0000 (15:59 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 15 Sep 2020 19:59:36 +0000 (15:59 -0400)
commit11b4b23d0650931ba645cce594e2953f6db0c26e
tree25f9137c9495261b7267fd38cd5bd5dcb18733ac
parent2db3075b0343ba2634039e6ac332fcb1163c1bfd
xfs: Add xfs_has_attr and subroutines

Source kernel commit: 07120f1abdff80f3d1351f733661abe28d609535

This patch adds a new functions to check for the existence of an
attribute. Subroutines are also added to handle the cases of leaf
blocks, nodes or shortform. Common code that appears in existing attr
add and remove functions have been factored out to help reduce the
appearance of duplicated code.  We will need these routines later for
delayed attributes since delayed operations cannot return error codes.

Signed-off-by: Allison Collins <allison.henderson@oracle.com>
Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
[darrick: fix a leak-on-error bug reported by Dan Carpenter]
[darrick: fix unused variable warning reported by 0day]
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Dave Chinner <dchinner@redhat.com>
Reported-by: dan.carpenter@oracle.com
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_attr.c
libxfs/xfs_attr.h
libxfs/xfs_attr_leaf.c
libxfs/xfs_attr_leaf.h