Skip to content

Commit

Permalink
Merge tag 'for-linus-5.8-ofs1' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
torvalds committed Jun 5, 2020
2 parents e3cea0c + 0df5564 commit aaa2faa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions fs/orangefs/orangefs-bufmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@ static DEFINE_SPINLOCK(orangefs_bufmap_lock);
static void
orangefs_bufmap_unmap(struct orangefs_bufmap *bufmap)
{
int i;

for (i = 0; i < bufmap->page_count; i++)
put_page(bufmap->page_array[i]);
unpin_user_pages(bufmap->page_array, bufmap->page_count);
}

static void
Expand Down Expand Up @@ -268,7 +265,7 @@ orangefs_bufmap_map(struct orangefs_bufmap *bufmap,
int offset = 0, ret, i;

/* map the pages */
ret = get_user_pages_fast((unsigned long)user_desc->ptr,
ret = pin_user_pages_fast((unsigned long)user_desc->ptr,
bufmap->page_count, FOLL_WRITE, bufmap->page_array);

if (ret < 0)
Expand All @@ -280,7 +277,7 @@ orangefs_bufmap_map(struct orangefs_bufmap *bufmap,

for (i = 0; i < ret; i++) {
SetPageError(bufmap->page_array[i]);
put_page(bufmap->page_array[i]);
unpin_user_page(bufmap->page_array[i]);
}
return -ENOMEM;
}
Expand Down
2 changes: 1 addition & 1 deletion fs/orangefs/orangefs-mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ DECLARE_WAIT_QUEUE_HEAD(orangefs_request_list_waitq);

static int __init orangefs_init(void)
{
int ret = -1;
int ret;
__u32 i = 0;

if (op_timeout_secs < 0)
Expand Down

0 comments on commit aaa2faa

Please sign in to comment.