[PATCH] statfs compat functions can return EOVERFLOW on NFS
A while ago, we fixed a problem in statfs on 64bit system that caused it to return EOVERFLOW when the number of files reported by the underlying file system was -1 (which happens for NFS for instance). The problematic code was this: if (sizeof ubuf->f_blocks == 4) { if ((kbuf->f_blocks | kbuf->f_bfree | kbuf->f_bavail | kbuf->f_files | kbuf->f_ffree) & 0xffffffff00000000ULL) return -EOVERFLOW; ... } The problem was fixed by explicitly allowing f_files and f_ffree to be -1. The same problem exists in fs/compat.c, and the attached patch fixes it in a similar manner. Signed-Off-By: Olaf Kirch <okir@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment