summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-12-20 09:34:58 +0300
committerChandan Babu R <chandanbabu@kernel.org>2023-12-29 11:07:04 +0300
commit6c8d169bbd51fc10d1d0029d495962881315b4c2 (patch)
tree3f42019029773653bfabce94e9ba8d09d0053e3c /scripts
parent14f2e4ab5d0310c2bb231941d9884fa5bae47fab (diff)
downloadlinux-6c8d169bbd51fc10d1d0029d495962881315b4c2.tar.xz
xfs: simplify xfs_attr_sf_findname
xfs_attr_sf_findname has the simple job of finding a xfs_attr_sf_entry in the attr fork, but the convoluted calling convention obfuscates that. Return the found entry as the return value instead of an pointer argument, as the -ENOATTR/-EEXIST can be trivally derived from that, and remove the basep argument, as it is equivalent of the offset of sfe in the data for if an sfe was found, or an offset of totsize if not was found. To simplify the totsize computation add a xfs_attr_sf_endptr helper that returns the imaginative xfs_attr_sf_entry at the end of the current attrs. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions