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

Merge tag 'for-linus-5.8-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux

Pull orangefs updates from Mike Marshall:

- John Hubbard's conversion from get_user_pages() to pin_user_pages()

- Colin Ian King's removal of an unneeded variable initialization

* tag 'for-linus-5.8-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
orangefs: convert get_user_pages() --> pin_user_pages()
orangefs: remove redundant assignment to variable ret

+4 -7
+3 -6
fs/orangefs/orangefs-bufmap.c
··· 168 168 static void 169 169 orangefs_bufmap_unmap(struct orangefs_bufmap *bufmap) 170 170 { 171 - int i; 172 - 173 - for (i = 0; i < bufmap->page_count; i++) 174 - put_page(bufmap->page_array[i]); 171 + unpin_user_pages(bufmap->page_array, bufmap->page_count); 175 172 } 176 173 177 174 static void ··· 265 268 int offset = 0, ret, i; 266 269 267 270 /* map the pages */ 268 - ret = get_user_pages_fast((unsigned long)user_desc->ptr, 271 + ret = pin_user_pages_fast((unsigned long)user_desc->ptr, 269 272 bufmap->page_count, FOLL_WRITE, bufmap->page_array); 270 273 271 274 if (ret < 0) ··· 277 280 278 281 for (i = 0; i < ret; i++) { 279 282 SetPageError(bufmap->page_array[i]); 280 - put_page(bufmap->page_array[i]); 283 + unpin_user_page(bufmap->page_array[i]); 281 284 } 282 285 return -ENOMEM; 283 286 }
+1 -1
fs/orangefs/orangefs-mod.c
··· 79 79 80 80 static int __init orangefs_init(void) 81 81 { 82 - int ret = -1; 82 + int ret; 83 83 __u32 i = 0; 84 84 85 85 if (op_timeout_secs < 0)