Skip to content

Commit

Permalink
Revert "xen/privcmd: create address space to allow writable mmaps"
Browse files Browse the repository at this point in the history
This reverts commit 24a89b5.

We should no longer need an address space now that we're correctly
setting VM_PFNMAP on our vmas.

Conflicts:

	drivers/xen/xenfs/super.c

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
  • Loading branch information
Jeremy Fitzhardinge committed Nov 19, 2010
1 parent fe61f1d commit 9045d47
Showing 1 changed file with 4 additions and 36 deletions.
40 changes: 4 additions & 36 deletions drivers/xen/xenfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/magic.h>
#include <linux/mm.h>
#include <linux/backing-dev.h>

#include <xen/xen.h>

Expand All @@ -24,28 +22,12 @@
MODULE_DESCRIPTION("Xen filesystem");
MODULE_LICENSE("GPL");

static int xenfs_set_page_dirty(struct page *page)
{
return !TestSetPageDirty(page);
}

static const struct address_space_operations xenfs_aops = {
.set_page_dirty = xenfs_set_page_dirty,
};

static struct backing_dev_info xenfs_backing_dev_info = {
.ra_pages = 0, /* No readahead */
.capabilities = BDI_CAP_NO_ACCT_AND_WRITEBACK,
};

static struct inode *xenfs_make_inode(struct super_block *sb, int mode)
{
struct inode *ret = new_inode(sb);

if (ret) {
ret->i_mode = mode;
ret->i_mapping->a_ops = &xenfs_aops;
ret->i_mapping->backing_dev_info = &xenfs_backing_dev_info;
ret->i_uid = ret->i_gid = 0;
ret->i_blocks = 0;
ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
Expand Down Expand Up @@ -137,25 +119,11 @@ static struct file_system_type xenfs_type = {

static int __init xenfs_init(void)
{
int err;
if (!xen_domain()) {
printk(KERN_INFO "xenfs: not registering filesystem on non-xen platform\n");
return 0;
}

err = register_filesystem(&xenfs_type);
if (err) {
printk(KERN_ERR "xenfs: Unable to register filesystem!\n");
goto out;
}

err = bdi_init(&xenfs_backing_dev_info);
if (err)
unregister_filesystem(&xenfs_type);

out:
if (xen_domain())
return register_filesystem(&xenfs_type);

return err;
printk(KERN_INFO "XENFS: not registering filesystem on non-xen platform\n");
return 0;
}

static void __exit xenfs_exit(void)
Expand Down

0 comments on commit 9045d47

Please sign in to comment.