We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3708f84 commit ce85cfbCopy full SHA for ce85cfb
fs/nfs/dir.c
@@ -544,6 +544,9 @@ int nfs_readdir_page_filler(nfs_readdir_descriptor_t *desc, struct nfs_entry *en
544
if (scratch == NULL)
545
return -ENOMEM;
546
547
+ if (buflen == 0)
548
+ goto out_nopages;
549
+
550
xdr_init_decode_pages(&stream, &buf, xdr_pages, buflen);
551
xdr_set_scratch_buffer(&stream, page_address(scratch), PAGE_SIZE);
552
@@ -565,6 +568,7 @@ int nfs_readdir_page_filler(nfs_readdir_descriptor_t *desc, struct nfs_entry *en
565
568
break;
566
569
} while (!entry->eof);
567
570
571
+out_nopages:
572
if (count == 0 || (status == -EBADCOOKIE && entry->eof != 0)) {
573
array = nfs_readdir_get_array(page);
574
if (!IS_ERR(array)) {
0 commit comments