page size. This is essentially Chinner's patch from a while
back.
Signed-off-by: Bill Kendall <wkendall@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Mark Goodwin <markgw@sgi.com>
memcpy(&alhreq.pos, cursor, sizeof(alhreq.pos));
alhreq.flags = flags;
- alhreq.buflen = bufsize;
alhreq.buffer = buf;
+ alhreq.buflen = bufsize;
+ /* prevent needless EINVAL from the kernel */
+ if (alhreq.buflen > XATTR_LIST_MAX)
+ alhreq.buflen = XATTR_LIST_MAX;
error = xfsctl(path, fd, XFS_IOC_ATTRLIST_BY_HANDLE, &alhreq);
filehandle_t filehandle;
int rval;
+ /* prevent needless EINVAL from the kernel */
+ if (bufsz > XATTR_LIST_MAX)
+ bufsz = XATTR_LIST_MAX;
+
jdm_fill_filehandle( &filehandle, fshandlep, statp );
rval = attr_list_by_handle (( void * )&filehandle,
sizeof( filehandle ),