Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

NFS: Update readdir to use a scratch folio

Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>

+4 -4
+4 -4
fs/nfs/dir.c
··· 829 829 struct address_space *mapping = desc->file->f_mapping; 830 830 struct folio *new, *folio = *arrays; 831 831 struct xdr_stream stream; 832 - struct page *scratch; 832 + struct folio *scratch; 833 833 struct xdr_buf buf; 834 834 u64 cookie; 835 835 int status; 836 836 837 - scratch = alloc_page(GFP_KERNEL); 837 + scratch = folio_alloc(GFP_KERNEL, 0); 838 838 if (scratch == NULL) 839 839 return -ENOMEM; 840 840 841 841 xdr_init_decode_pages(&stream, &buf, xdr_pages, buflen); 842 - xdr_set_scratch_page(&stream, scratch); 842 + xdr_set_scratch_folio(&stream, scratch); 843 843 844 844 do { 845 845 status = nfs_readdir_entry_decode(desc, entry, &stream); ··· 891 891 if (folio != *arrays) 892 892 nfs_readdir_folio_unlock_and_put(folio); 893 893 894 - put_page(scratch); 894 + folio_put(scratch); 895 895 return status; 896 896 } 897 897