From: Alexey Korolev <akorolex@gmail.com>
To: Mel Gorman <mel@csn.ul.ie>, Eric Munson <linux-mm@mgebm.net>,
Alexey Korolev <akorolev@infradead.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] Export of hugetlb_file_setup function. (Take 3)
Date: Mon, 14 Sep 2009 17:20:02 +1200 [thread overview]
Message-ID: <202cde0e0909132220v6a28ce5che6b216d296aeb33d@mail.gmail.com> (raw)
This patch provides drivers with export of hugetlb_file_setup function.
This patch exports hugetlb_file_setup function, that will be used to
create a file on the internal vfsmount. Also it adds enum entry just
to notify that file is created by device driver. Accounting rules are
the same as for HUGETLB_ANONHUGE_INODE.
fs/hugetlbfs/inode.c | 1 +
include/linux/hugetlb.h | 5 +++++
2 files changed, 6 insertions(+)
---
Signed-off-by: Alexey Korolev <akorolev@infradead.org>
diff -aurp clean/fs/hugetlbfs/inode.c patched/fs/hugetlbfs/inode.c
--- clean/fs/hugetlbfs/inode.c 2009-09-11 15:33:48.000000000 +1200
+++ patched/fs/hugetlbfs/inode.c 2009-09-11 15:29:31.000000000 +1200
@@ -1012,6 +1012,7 @@ out_shm_unlock:
}
return ERR_PTR(error);
}
+EXPORT_SYMBOL_GPL(hugetlb_file_setup);
static int __init init_hugetlbfs_fs(void)
{
diff -aurp clean/include/linux/hugetlb.h patched/include/linux/hugetlb.h
--- clean/include/linux/hugetlb.h 2009-09-11 15:33:48.000000000 +1200
+++ patched/include/linux/hugetlb.h 2009-09-11 20:09:02.000000000 +1200
@@ -123,6 +126,11 @@ enum {
* accounting rules do not apply
*/
HUGETLB_ANONHUGE_INODE = 2,
+ /*
+ * The file is being created for use of device drivers,shmfs
+ * accounting rules do not apply
+ */
+ HUGETLB_DEVBACK_INODE = 3,
};
#ifdef CONFIG_HUGETLBFS
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
reply other threads:[~2009-09-14 5:19 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=202cde0e0909132220v6a28ce5che6b216d296aeb33d@mail.gmail.com \
--to=akorolex@gmail.com \
--cc=akorolev@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-mm@mgebm.net \
--cc=mel@csn.ul.ie \
/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;
as well as URLs for NNTP newsgroup(s).