From: William Lee Irwin III <wli@holomorphy.com>
To: linux-kernel@vger.kernel.org
Subject: [6/11] hugetlb: remove direct usage of struct inode
Date: Tue, 12 Nov 2002 00:28:53 -0800 [thread overview]
Message-ID: <E18BWPl-0005KG-00@holomorphy> (raw)
Remove the last direct usage of struct inode within the hugetlb functions.
hugetlbpage.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff -urpN htlb-2.5.47-5/arch/i386/mm/hugetlbpage.c htlb-2.5.47-6/arch/i386/mm/hugetlbpage.c
--- htlb-2.5.47-5/arch/i386/mm/hugetlbpage.c 2002-11-11 21:49:53.000000000 -0800
+++ htlb-2.5.47-6/arch/i386/mm/hugetlbpage.c 2002-11-11 21:55:12.000000000 -0800
@@ -398,13 +398,13 @@ static int alloc_shared_hugetlb_pages(in
{
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
- struct inode *inode;
+ struct hugetlb_key *hugetlb_key;
int retval = -ENOMEM;
int newalloc = 0;
- inode = (struct inode *)alloc_key(key, len, prot, flag, &newalloc);
- if (IS_ERR(inode)) {
- retval = PTR_ERR(inode);
+ hugetlb_key = alloc_key(key, len, prot, flag, &newalloc);
+ if (IS_ERR(hugetlb_key)) {
+ retval = PTR_ERR(hugetlb_key);
spin_unlock(&htlbpage_lock);
goto out_err;
} else
@@ -421,7 +421,7 @@ static int alloc_shared_hugetlb_pages(in
goto freeinode;
}
- retval = prefault_key((struct hugetlb_key *)inode, vma);
+ retval = prefault_key(hugetlb_key, vma);
if (retval)
goto out;
@@ -429,7 +429,7 @@ static int alloc_shared_hugetlb_pages(in
vma->vm_ops = &hugetlb_vm_ops;
spin_unlock(&mm->page_table_lock);
spin_lock(&htlbpage_lock);
- clear_key_busy((struct hugetlb_key *)inode);
+ clear_key_busy(hugetlb_key);
spin_unlock(&htlbpage_lock);
return retval;
out:
@@ -448,7 +448,7 @@ out:
out_err: spin_unlock(&htlbpage_lock);
freeinode:
if (newalloc)
- release_key((struct hugetlb_key *)inode);
+ release_key(hugetlb_key);
return retval;
}
reply other threads:[~2002-11-12 8:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E18BWPl-0005KG-00@holomorphy \
--to=wli@holomorphy.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®