--- linux-2.6.10/arch/s390/kernel/compat_linux.c 2004-12-25 03:05:24.000000000 +0530 +++ /home/sripathi/12795/mainline/compat_linux.c 2005-02-01 14:06:33.000000000 +0530 @@ -433,7 +433,7 @@ static int filldir(void * __buf, const c { struct linux_dirent32 * dirent; struct getdents_callback32 * buf = (struct getdents_callback32 *) __buf; - int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); + int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 2); buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) @@ -447,6 +447,7 @@ static int filldir(void * __buf, const c put_user(reclen, &dirent->d_reclen); copy_to_user(dirent->d_name, name, namlen); put_user(0, dirent->d_name + namlen); + put_user(d_type, (char *) dirent + reclen - 1); buf->current_dir = ((void *)dirent) + reclen; buf->count -= reclen; return 0;