]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfsd/vfs.c
[PATCH] Optimise NFS readdir hack slightly.
[linux-2.6-omap-h63xx.git] / fs / nfsd / vfs.c
index e3e37f7c84775cfb350750d96db4e598d9f54bde..49d4b8725ca374e778b1cca112ffa4bc5ac791f1 100644 (file)
@@ -1891,7 +1891,6 @@ static int nfsd_buffered_readdir(struct file *file, filldir_t func,
                if (!size)
                        break;
 
-
                de = (struct buffered_dirent *)buf.dirent;
                while (size > 0) {
                        offset = de->offset;
@@ -1908,7 +1907,9 @@ static int nfsd_buffered_readdir(struct file *file, filldir_t func,
                        size -= reclen;
                        de = (struct buffered_dirent *)((char *)de + reclen);
                }
-               offset = vfs_llseek(file, 0, 1);
+               offset = vfs_llseek(file, 0, SEEK_CUR);
+               if (!buf.full)
+                       break;
        }
 
  done: