diff options
author | Christoph Hellwig <hch@lst.de> | 2020-02-26 17:30:38 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-03-02 20:55:54 -0800 |
commit | 3e7a779937a225336922ce48fe7a4a609c7db3e2 (patch) | |
tree | 3f36e8ce76d04c8664878d9c14c87458f343d8ca /fs/xfs/xfs_ioctl32.c | |
parent | 2f014aad03d8f7042cb796dbd550665ec73988d2 (diff) | |
download | linux-3e7a779937a225336922ce48fe7a4a609c7db3e2.tar.bz2 |
xfs: move the legacy xfs_attr_list to xfs_ioctl.c
The old xfs_attr_list code is only used by the attrlist by handle
ioctl. Move it to xfs_ioctl.c with its user. Also move the
attrlist and attrlist_ent structure to xfs_fs.h, as they are exposed
user ABIs. They are used through libattr headers with the same name
by at least xfsdump. Also document this relation so that it doesn't
require a research project to figure out.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_ioctl32.c')
-rw-r--r-- | fs/xfs/xfs_ioctl32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c index e1daf095c585..10ea0222954c 100644 --- a/fs/xfs/xfs_ioctl32.c +++ b/fs/xfs/xfs_ioctl32.c @@ -366,7 +366,7 @@ xfs_compat_attrlist_by_handle( if (copy_from_user(&al_hreq, arg, sizeof(compat_xfs_fsop_attrlist_handlereq_t))) return -EFAULT; - if (al_hreq.buflen < sizeof(struct attrlist) || + if (al_hreq.buflen < sizeof(struct xfs_attrlist) || al_hreq.buflen > XFS_XATTR_LIST_MAX) return -EINVAL; @@ -388,7 +388,7 @@ xfs_compat_attrlist_by_handle( goto out_dput; cursor = (attrlist_cursor_kern_t *)&al_hreq.pos; - error = xfs_attr_list(XFS_I(d_inode(dentry)), kbuf, al_hreq.buflen, + error = xfs_ioc_attr_list(XFS_I(d_inode(dentry)), kbuf, al_hreq.buflen, al_hreq.flags, cursor); if (error) goto out_kfree; |