From: Avi Kivity <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
diff --git a/kernel/anon_inodes.c b/kernel/anon_inodes.c index 05ec845..74630ea 100644 --- a/kernel/anon_inodes.c +++ b/kernel/anon_inodes.c @@ -69,9 +69,6 @@ static struct dentry_operations anon_inodefs_dentry_operations = { * anonymous inode, and a dentry that describe the "class" * of the file * - * @pfd: [out] pointer to the file descriptor - * @dpinode: [out] pointer to the inode - * @pfile: [out] pointer to the file struct * @name: [in] name of the "class" of the new file * @fops [in] file operations for the new file * @priv [in] private data for the new file (will be file's private_data) @@ -80,10 +77,9 @@ static struct dentry_operations anon_inodefs_dentry_operations = { * that do not need to have a full-fledged inode in order to operate correctly. * All the files created with anon_inode_getfd() will share a single inode, by * hence saving memory and avoiding code duplication for the file/inode/dentry - * setup. + * setup. Returns new descriptor or -error. */ -int anon_inode_getfd(int *pfd, struct inode **pinode, struct file **pfile, - const char *name, const struct file_operations *fops, +int anon_inode_getfd(const char *name, const struct file_operations *fops, void *priv) { struct qstr this; @@ -138,10 +134,7 @@ int anon_inode_getfd(int *pfd, struct inode **pinode, struct file **pfile, fd_install(fd, file); - *pfd = fd; - *pinode = inode; - *pfile = file; - return 0; + return fd; err_put_unused_fd: put_unused_fd(fd); diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index 2960b2f..5b9e2a4 100644 --- a/kernel/external-module-compat.h +++ b/kernel/external-module-compat.h @@ -137,9 +137,14 @@ int kvm_smp_call_function_single(int cpu, void (*func)(void *info), */ #include <asm/system.h> +struct inode; +#include <linux/anon_inodes.h> #define anon_inode_getfd kvm_anon_inode_getfd int kvm_init_anon_inodes(void); void kvm_exit_anon_inodes(void); +int anon_inode_getfd(const char *name, + const struct file_operations *fops, + void *priv); #include <linux/smp.h> diff --git a/kernel/include-compat/linux/anon_inodes.h b/kernel/include-compat/linux/anon_inodes.h index 3092c4e..7b6862f 100644 --- a/kernel/include-compat/linux/anon_inodes.h +++ b/kernel/include-compat/linux/anon_inodes.h @@ -8,8 +8,9 @@ #ifndef _LINUX_ANON_INODES_H #define _LINUX_ANON_INODES_H -int anon_inode_getfd(int *pfd, struct inode **pinode, struct file **pfile, - const char *name, const struct file_operations *fops, +struct file_operations; + +int anon_inode_getfd(const char *name, const struct file_operations *fops, void *priv); #endif /* _LINUX_ANON_INODES_H */ ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ kvm-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits