All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dilger, Andreas" <andreas.dilger@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: sayli karnik <karniksayli1995@gmail.com>,
	"outreachy-kernel@googlegroups.com"
	<outreachy-kernel@googlegroups.com>,
	"Drokin, Oleg" <oleg.drokin@intel.com>,
	James Simmons <jsimmons@infradead.org>
Subject: Re: [Outreachy kernel] [PATCH] staging: lustre: llite: rw26: Remove unused function definition
Date: Wed, 15 Mar 2017 09:07:17 +0000	[thread overview]
Message-ID: <5D9F29B8-FC98-4FE2-B218-4F5173382EE2@intel.com> (raw)
In-Reply-To: <20170312134000.GE27791@kroah.com>

On Mar 12, 2017, at 07:40, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> 
> On Sat, Mar 11, 2017 at 12:01:53PM +0530, sayli karnik wrote:
>> The patch removes unused function definition ll_get_user_pages().
>> 
>> Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
>> ---
>> drivers/staging/lustre/lustre/llite/rw26.c | 26 --------------------------
>> 1 file changed, 26 deletions(-)
>> 
>> diff --git a/drivers/staging/lustre/lustre/llite/rw26.c b/drivers/staging/lustre/lustre/llite/rw26.c
>> index d89e795..420f296 100644
>> --- a/drivers/staging/lustre/lustre/llite/rw26.c
>> +++ b/drivers/staging/lustre/lustre/llite/rw26.c
>> @@ -156,32 +156,6 @@ static int ll_releasepage(struct page *vmpage, gfp_t gfp_mask)
>> 
>> #define MAX_DIRECTIO_SIZE (2 * 1024 * 1024 * 1024UL)
>> 
>> -static inline int ll_get_user_pages(int rw, unsigned long user_addr,
>> -				    size_t size, struct page ***pages,
>> -				    int *max_pages)
>> -{
>> -	int result = -ENOMEM;
>> -
>> -	/* set an arbitrary limit to prevent arithmetic overflow */
>> -	if (size > MAX_DIRECTIO_SIZE) {
>> -		*pages = NULL;
>> -		return -EFBIG;
>> -	}
>> -
>> -	*max_pages = (user_addr + size + PAGE_SIZE - 1) >> PAGE_SHIFT;
>> -	*max_pages -= user_addr >> PAGE_SHIFT;
>> -
>> -	*pages = libcfs_kvzalloc(*max_pages * sizeof(**pages), GFP_NOFS);
>> -	if (*pages) {
>> -		result = get_user_pages_fast(user_addr, *max_pages,
>> -					     (rw == READ), *pages);
>> -		if (unlikely(result <= 0))
>> -			kvfree(*pages);
>> -	}
>> -
>> -	return result;
>> -}
>> -
> 
> Should this be deleted?  Given that ll_free_user_pages() is used, that
> implies that this function should also be used somewhere.  Why isn't it?

Al replaced the use of ll_get_user_pages() with iov_iter_get_pages_alloc() in
commit 91f79c43d1b54d7154b118860d81b39bad07dfff so it is no longer used.

Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation









  reply	other threads:[~2017-03-15  9:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-11  6:31 [PATCH] staging: lustre: llite: rw26: Remove unused function definition sayli karnik
2017-03-12 13:40 ` [Outreachy kernel] " Greg Kroah-Hartman
2017-03-15  9:07   ` Dilger, Andreas [this message]
2017-03-15 16:05     ` sayli karnik
2017-03-16  1:50       ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5D9F29B8-FC98-4FE2-B218-4F5173382EE2@intel.com \
    --to=andreas.dilger@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jsimmons@infradead.org \
    --cc=karniksayli1995@gmail.com \
    --cc=oleg.drokin@intel.com \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.