]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 9 Nov 2008 20:25:44 +0000 (12:25 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 9 Nov 2008 20:25:44 +0000 (12:25 -0800)
* 'for-2.6.28' of git://linux-nfs.org/~bfields/linux:
  Fix nfsd truncation of readdir results

fs/nfsd/vfs.c

index 848a03e83a425270050f474d6031e0df9f4da933..4433c8f001635862419edb603ecf5725462f3222 100644 (file)
@@ -1875,11 +1875,11 @@ static int nfsd_buffered_readdir(struct file *file, filldir_t func,
                return -ENOMEM;
 
        offset = *offsetp;
-       cdp->err = nfserr_eof; /* will be cleared on successful read */
 
        while (1) {
                unsigned int reclen;
 
+               cdp->err = nfserr_eof; /* will be cleared on successful read */
                buf.used = 0;
                buf.full = 0;
 
@@ -1912,9 +1912,6 @@ static int nfsd_buffered_readdir(struct file *file, filldir_t func,
                        de = (struct buffered_dirent *)((char *)de + reclen);
                }
                offset = vfs_llseek(file, 0, SEEK_CUR);
-               cdp->err = nfserr_eof;
-               if (!buf.full)
-                       break;
        }
 
  done: