From: Gioh Kim <gioh.kim@lge.com>
To: jlayton@poochiereds.net, bfields@fieldses.org, vbabka@suse.cz,
iamjoonsoo.kim@lge.com, viro@zeniv.linux.org.uk, mst@redhat.com,
koct9i@gmail.com, minchan@kernel.org, aquini@redhat.com,
linux-fsdevel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
linux-mm@kvack.org
Cc: akpm@linux-foundation.org, Gioh Kim <gioh.kim@lge.com>
Subject: [RFCv2 2/5] fs/anon_inodes: get a new inode
Date: Fri, 26 Jun 2015 18:58:27 +0900 [thread overview]
Message-ID: <1435312710-15108-3-git-send-email-gioh.kim@lge.com> (raw)
In-Reply-To: <1435312710-15108-1-git-send-email-gioh.kim@lge.com>
A inode is necessary for some drivers that needs special address_space
and address_space_operation for page migration. Each drivers can create
inode with the anon_inodefs.
Signed-off-by: Gioh Kim <gioh.kim@lge.com>
---
fs/anon_inodes.c | 6 ++++++
include/linux/anon_inodes.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
index 80ef38c..1d51f96 100644
--- a/fs/anon_inodes.c
+++ b/fs/anon_inodes.c
@@ -162,6 +162,12 @@ err_put_unused_fd:
}
EXPORT_SYMBOL_GPL(anon_inode_getfd);
+struct inode *anon_inode_new(void)
+{
+ return alloc_anon_inode(anon_inode_mnt->mnt_sb);
+}
+EXPORT_SYMBOL_GPL(anon_inode_new);
+
static int __init anon_inode_init(void)
{
anon_inode_mnt = kern_mount(&anon_inode_fs_type);
diff --git a/include/linux/anon_inodes.h b/include/linux/anon_inodes.h
index 8013a45..ddbd67f 100644
--- a/include/linux/anon_inodes.h
+++ b/include/linux/anon_inodes.h
@@ -15,6 +15,7 @@ struct file *anon_inode_getfile(const char *name,
void *priv, int flags);
int anon_inode_getfd(const char *name, const struct file_operations *fops,
void *priv, int flags);
+struct inode *anon_inode_new(void);
#endif /* _LINUX_ANON_INODES_H */
--
1.9.1
--
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>
next prev parent reply other threads:[~2015-06-26 9:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 9:58 [RFCv2 0/5] enable migration of driver pages Gioh Kim
2015-06-26 9:58 ` [RFCv2 1/5] mm/compaction: enable driver page migration Gioh Kim
2015-07-04 18:49 ` Konstantin Khlebnikov
2015-06-26 9:58 ` Gioh Kim [this message]
2015-06-26 9:58 ` [RFCv2 3/5] mm/balloon: apply driver page migratable into balloon Gioh Kim
2015-07-04 18:55 ` Konstantin Khlebnikov
2015-06-26 9:58 ` [RFCv2 4/5] mm/compaction: compaction calls generic migration Gioh Kim
2015-07-04 18:13 ` Konstantin Khlebnikov
2015-07-04 19:00 ` Konstantin Khlebnikov
2015-06-26 9:58 ` [RFCv2 5/5] mm: remove direct calling of migration Gioh Kim
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=1435312710-15108-3-git-send-email-gioh.kim@lge.com \
--to=gioh.kim@lge.com \
--cc=akpm@linux-foundation.org \
--cc=aquini@redhat.com \
--cc=bfields@fieldses.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=jlayton@poochiereds.net \
--cc=koct9i@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=mst@redhat.com \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=virtualization@lists.linux-foundation.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