When doing a listxattr on an inode which does not have i_op->listxattr defined and you are giving the exact number of bytes required, the code wrongly considers this value too small and instead returns ERANGE. The bug was introduced in 2.6.14, I believe with: diff --git a/fs/xattr.c b/fs/xattr.c index 6acd5c6..3f9c64b 100644 in which the test in the fs/xattr.c file, line 246, is as follows: if (size && error >= size) error = -ERANGE; However, the 'real' filesystems do the test only with >, since the 'error' parameter is what is returned by this function and thus, when passed back as 'size', it should be accepted. Fix: change the comparison to '>' only. Regards, Iustin Pop
It seems it was fixed in 2.6.14.4. Thanks!