@@ -45,16 +45,16 @@ static const struct file_operations capabilities_file_ops = {
static int xenfs_fill_super(struct super_block *sb, void *data, int silent)
{
static struct tree_descr xenfs_files[] = {
- [2] = { "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
+ [2] = { "xenbus", NULL, S_IFLNK | S_IRWXUGO, "/dev/xen/xenbus" },
{ "capabilities", &capabilities_file_ops, S_IRUGO },
- { "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR },
+ { "privcmd", NULL, S_IFLNK | S_IRWXUGO, "/dev/xen/privcmd" },
{""},
};
static struct tree_descr xenfs_init_files[] = {
- [2] = { "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
+ [2] = { "xenbus", NULL, S_IFLNK | S_IRWXUGO, "/dev/xen/xenbus" },
{ "capabilities", &capabilities_file_ops, S_IRUGO },
- { "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR },
+ { "privcmd", NULL, S_IFLNK | S_IRWXUGO, "/dev/xen/privcmd" },
{ "xsd_kva", &xsd_kva_file_ops, S_IRUSR|S_IWUSR},
{ "xsd_port", &xsd_port_file_ops, S_IRUSR|S_IWUSR},
#ifdef CONFIG_XEN_SYMS
/proc/xen/xenbus does not work correctly. A read blocked waiting for a xenbus message will deadlock a write to the same file handle due to the requirement for atomic file position updates on regular files. /proc/xen/xenbus and /proc/xen/privcmd are supposed to be identical to the character devices /dev/xen/xenbus and /dev/xen/privcmd so replace the files with symlinks. Signed-off-by: David Vrabel <david.vrabel@citrix.com> --- drivers/xen/xenfs/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)