X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fliblustre%2Fdir.c;h=87b75363475b5b1b031a0c54b2b80af3d9da8cc2;hp=9f7797d8e7e1e8483b3b4a440516360c4c60f45a;hb=b703901c435dac562a869d5eea5e96b2ce342d42;hpb=027fddd052930686339e2067c6869d0846563ffe;ds=sidebyside diff --git a/lustre/liblustre/dir.c b/lustre/liblustre/dir.c index 9f7797d..87b7536 100644 --- a/lustre/liblustre/dir.c +++ b/lustre/liblustre/dir.c @@ -252,6 +252,14 @@ ssize_t llu_iop_filldirentries(struct inode *ino, _SYSIO_OFF_T *basep, le32_to_cpu(de->inode), d_type, &filled); if (over) { free_page(page); + /* + * if buffer overflow with no data + * returned yet, then report error + * instead of eof + */ + if (filled == 0) + RETURN(-EINVAL); + GOTO(done, 0); } }